Patanjali also called Gonardiya or Gonikaputra, was a Hindu author, mystic and philosopher. Estimates based on analysis of his works suggests that he may have lived between the 2nd century BCE and the 4th century CE. Patanjali is regarded as an avatar of Adi Sesha.
Patanjali as an avatar of Shesha
A garlanded Patanjali statue
Patañjali – Modern art rendering in Patanjali Yogpeeth, Haridwar
Shesha, also known by his epithets Sheshanaga and Adishesha, is a serpentine demigod (naga) and Nagaraja, as well as a primordial being of creation in Hinduism. In the Puranas, Shesha is said to hold all the planets of the universe on his hoods and to constantly sing the glories of Vishnu from all his mouths. He is sometimes referred to as Ananta Shesha,
Idol of Shesha, Kathmandu
Narayana resting on Adhishesha, with his consort Lakshmi massaging his feet
As Lakshmana, Shesha accompanied his lord in his Rama avatar.
As Balarama, Shesha accompanied Vishnu in his Krishna Avatar.