The judges of the court shall have the power and jurisdiction to send processes and other mandates in any matter of which they have jurisdiction into any part of the county or any adjoining county, for service or execution, as provided by the criminal procedure law; and particularly to compel the attendance of witnesses, to order the conditional examination of witnesses, to issue commissions for the examination of witnesses within or without the state, to inquire into the sanity of a defendant and to dismiss the prosecution of an action conformably to the provisions of the criminal procedure law, and to punish for criminal contempt a person guilty thereof in the manner and subject to the limitations prescribed for courts of record by the judiciary law.
N.Y. Uniform City Court § 2005