The officer who executes the warrant must take the defendant before the nearest or most accessible magistrate of the county in which the offense is triable, and must deliver to him the complaint and the warrant, with his return endorsed thereon, and the magistrate must then proceed in the same manner as upon a warrant issued by himself.
Ca. Pen. Code § 828