While still a young man in search of spiritual knowledge, Tilopa was instructed by a Dakini:

In Bengal, in the East
In the marketplace of Pancapana,
There is the prostitute Bharima and her retinue.
If you follow it as her servant, you will be purified;
You will pass over the limits of practice and attain perfection!

Her went there according to what she [the Dakini] had said. Then, in the night-time he would do the work of inviting and accompanying men [into Bharima's]. During the day, he worked at thrashing sesame grains [a symbol of the sexual seed; this is a symbol of sexual transmutation], and that is why he was known as Tilopa in the language of India [Sanskrit: tila, "sesame"], and in Tibetan as the Sesame-watcher [Til-bsrungs-zhabs]. After that, he and Bharima went to the cemetary called Ke-re-li. There they took delight in the practice of the secret mantra [gsang-be-sngags; Tantrayana or sexual transmutation] and performed it to its completion.

Once again, while trashing [purifying] the remaining sesame [sexual] grains in a market-place [sexual union], he attained the perfection close to the sublime Great Seal [Mahamudra or Shunyata: the Void]. At that moment, the people of the town had different visions of him: some saw flames blazing from him, while others saw his ornaments of bones blazing. The people asked for instruction. At this he said: "O devotees, may this inborn reality in my mind [manas] enter your hearts!" Immediately they were liberated.

Then, as the king of that country surrounded by his retinue came on an elephant to pay his respects, both that son of brahmana [Tilopa] and Bharima raised this adamantine [indestructible] song with a loud Brahma voice:

The sesame oil, which is its essence,
Although the ignorant know it is in the sesame seed,
If they do not know how its constituents are combined,
They cannot extract the sesame oil, that essence. In the same way,
The co-emergent [sahaja] innate awareness [jnana],
Even if it is present in the hearts of all beings,
Its intuitive knowledge [of how to extract it] is impossible unless it [the method] is pointed out by a teacher.
By pounding the sesame [sexual energy] and clearing away the husks [psychological aggregates],
One can extract the sesame oil, that essence: similarly,
When one is close to the guru, the meaning of suchness [tathata]
Will be shown by means of a symbol like the sesame oil.

Excerpted from The Life of the Mahasiddha Tilopa by Marpa (Mar-pa Chos-kyi bLo-gros, ca. 1012-1097, a student of Tilopa), translated by Fabrizio Torricelli and Acharya Sangye T. Naga and published by the Library of Tibetan Works and Archives (1995).