Whenever any mandate, writ or commission is issued from any court of record in any foreign jurisdiction, or whenever upon notice or agreement it is required to take the testimony of a witness in this state, the witness may be compelled to appear and testify in the same manner and by the same process as employed for taking testimony in matters pending in the courts of this state.
W.S. 1-12-115