§ 751. Stay upon paying rent or giving undertaking; discretionary stay outside city of New York. The respondent may, at any time before a warrant is issued, stay the issuing thereof and also stay an execution to collect the costs, as follows:
1. Where the lessee or tenant holds over after a default in the payment of rent, or of taxes or assessments, he may effect a stay by depositing the amount of the rent due or of such taxes or assessments, and interest and penalty, if any thereon due, and the costs of the special proceeding, with the clerk of the court, or where the office of clerk is not provided for, with the court, who shall thereupon, upon demand, pay the amount deposited to the petitioner or his duly authorized agent; or by delivering to the court or clerk his undertaking to the petitioner in such sum as the court approves to the effect that he will pay the rent, or such taxes or assessments, and interest and penalty and costs within ten days, at the expiration of which time a warrant may issue, unless he produces to the court satisfactory evidence of the payment.
2. Where the lessee or tenant has taken the benefit of an insolvency statute or has been adjudicated a bankrupt, he may effect a stay by paying the costs of the special proceeding and by delivering to the court or clerk his undertaking to the petitioner in such a sum as the court approves to the effect that he will pay the rent of the premises as it has become or thereafter becomes due.
3. Where he continues in possession of real property which has been sold by virtue of an execution against his property, he may effect a stay by paying the costs of the special proceeding, and delivering to the court or clerk an affidavit that he claims the possession of the property by virtue of a right or title acquired after the sale or as guardian or trustee for another; together with his undertaking to the petitioner in such a sum as the court approves to the effect that he will pay any costs and damages which may be recovered against him in an action to recover the property brought against him by the petitioner within six months thereafter; and that he will not commit any waste upon or injury to the property during his occupation thereof.