Taking the deposition.
Section 368
SEC. 368. Taking the deposition. — Upon the appearance of the witness,. the judge or justice of the peace, or commissioner, as the case may be, must cause his testimony to be taken in writing, and must certify and transmit the same to the court or judge before whom the action or proceeding is pending, in such manner as the law of that State or country requires.