For attending court, when required to do so by law or by a judge or district attorney, or bringing into or removing therefrom prisoners for arraignment, trial or sentence or witnesses held in custody, an hourly rate equivalent to the prevailing wage scale of the performing sheriff's office shall be paid by the county for each deputy or special deputy actually present.
42 P.S. § 21113