For any trial or hearing referred to in Section 4750, the sheriff of the county where such trial or hearing is had and the person in charge of the prison may agree that the county shall transport prisoners in a state prison to and from such prison. Upon such agreement, the county, and not the Department of Corrections, shall perform the transportation referred to in this section.
Ca. Pen. Code § 4700.1