ยง 5211. Privilege on examination; immunity. The court may confer immunity upon any witness in accordance with the provisions of section 50.20 of the criminal procedure law for testimony or evidence in an enforcement procedure relating to disposition of property in which the judgment debtor has an interest, or relating to his or another person's claim to be entitled, as against the judgment creditor or a receiver, to hold property derived from or through the judgment debtor, or to be discharged from the payment of a debt which was due to the judgment debtor; provided, however, that no immunity shall be conferred except upon twenty-four hours' written notice to the appropriate district atorney having an official interest therein.