Except as provided in section 166 of this code, motions must be made in the court in which the action is pending.

(Amended by Stats. 1933, Ch. 744.)