When any criminal cases commenced by the people of the state of Michigan within any county of this state shall be transferred to another county for trial for any reason whatsoever, the prosecuting attorney of the county to which said cause is transferred shall be prohibited from defending or assisting in the defense of the cause so transferred; and in case the prosecuting attorney of the county to which said cause is transferred shall be employed to assist in the prosecution of said cause, the county from which said cause was transferred shall pay such charges to such prosecuting attorney as the court may allow.