Upon or after the arraignment in a superior court upon an indictment where the sole remaining count or counts charge a misdemeanor offense, and before the entry of a plea of guilty thereto or commencement of a trial thereof, the court, upon motion of the people or the defendant and with the consent of the other party, or upon the court's own motion with the consent of both the people and the defendant, may order that all proceedings be suspended and the action adjourned in contemplation of dismissal, in accordance with the provisions of section 170.55 of this chapter.
N.Y. Crim. Proc. Law § 210.47