2. When a person has been arrested in any district for a crime or offence committed within Québec, and a justice of the peace has taken recognizances from the witnesses heard before him or another justice of the peace, for their appearance, at the next term of the court before which such person is to undergo his trial, there to testify and give evidence on such trial, and such recognizances have been transmitted to the office of the clerk of such court, the said court may proceed on the said recognizances in the same manner as if they had been taken in the district in which such court is held.