Section 50. Upon requisition of the commanding officer or other person in charge of a reservation of the United States of America, the colonel, or the mayor or the selectmen of any city or town the territory of which adjoins or includes, in whole or in part, such reservations, may provide police officers, who shall perform such police duties within such reservation as such commanding officer or other person may assign to them, and who shall, while on such assignment, have the authority, immunities and privileges that they would have while acting as duly appointed and qualified police officers elsewhere within the commonwealth.