An individual convicted of crime in any of the courts of the United States in the state of Utah and prisoners held to answer before a federal court for a violation of any of the laws of the United States shall be received and held:
(1) in the jail of any county under the same regulations and laws governing prisoners held under the authority of this state; and
(2) upon the terms as to compensation as may be agreed upon by the county and the United States.