sa vai bhagavataḥ śrīmat-
bheje sarpa-vapur hitvā
saḥ—he (the serpent); vai—indeed; bhagavataḥ—of the Supreme Personality of Godhead, Kṛṣṇa; śrīmat-pāda-sparśa—by the touch of the lotus feet; hata-aśubhaḥ—relieved from all reactions of sinful life; bheje—achieved; sarpa-vapuḥ—the body of a snake; hitvā—giving up; rūpam—beauty; vidyādhara-arcitam—suitable for a person of Vidyādhara-loka.
" 'Being touched by the lotus feet of Śrī Kṛṣṇa, that serpent was immediately freed from the reactions of his sinful life. Thus the serpent gave up his body and assumed the body of a beautiful Vidyādhara demigod.' "
This is a quotation from Śrīmad-Bhāgavatam (10.34.9). The inhabitants of Vṛndāvana, under the leadership of Nanda Mahārāja, once wanted to go to the bank of the Sarasvatī on a pilgrimage. Nanda Mahārāja was fasting, and he lay down near the forest. At that time a serpent, who was formerly cursed by Āṅgirasa Ṛṣi, appeared. This serpent had formerly been named Sudarśana, and he had belonged to the Gandharvaloka planet. However, because he joked with the ṛṣi, he was condemned to take on the body of a big snake. When this serpent attacked Nanda Mahārāja, Nanda Mahārāja began to call, "Kṛṣṇa! Help!" Kṛṣṇa immediately appeared and began to kick the serpent with His lotus feet. Due to being touched by the Lord's lotus feet, the serpent was immediately freed from the reactions of his sinful life. Being freed, he again assumed his original form of Sudarśana, the Gandharva.
Link to this page: https://prabhupadabooks.com/cc/madhya/25/77