N.Y. Criminal Procedure Law § 170.50
1. At any time after arraignment in a local criminal court upon a prosecutor's information filed at the direction of a grand jury and before entry of a plea of guilty thereto or commencement of a trial thereof, the local criminal court wherein the prosecutor's information is filed may, upon motion of the defendant, dismiss such prosecutor's information or a count thereof upon the ground that: