Ex-Massachusetts lawyer accused of trying to bribe Medford police chief for pot shop sentenced to prison