(a) In cases of the grade of felony, commencing in any of the courts of this state, and afterwards removed to the United States district courts, and there disposed of adversely to the state, the costs of the prosecution shall be paid by the state, as in cases determined in the state courts.
(b) Sheriffs or other officers delivering prisoners from state to federal courts shall be allowed the same fees, and have the same guards and pay therefor, as is allowed for like services in state courts.