If a defendant is brought before a magistrate of another county under a bench warrant for the purpose of giving bail, the magistrate shall proceed in respect thereto in the same manner as if the defendant had been brought before the magistrate upon a warrant of arrest, and the same proceedings may be had thereon.
N.D.C.C. § 29-12-09