N.Y. Criminal Procedure Law § 170.80
1. Notwithstanding any other provision of law, at any time at or after arraignment on a charge of prostitution pursuant to section 230.00 of the penal law, after consultation with counsel, a knowing and voluntary plea of guilty has been entered to such charge, any judge or justice hearing any stage of such case may, upon consent of the defendant after consultation with counsel:
3.