Arthashastra
यत्र ब्राह्मणम् आहित अग्निं दग्धं दह्यमानं वा पश्येत् तत्र त्रि रात्र उपोषितः पुष्येण स्वयं मृतस्य वाससा प्रसेवं कृत्वा चिता भस्मना पूरयित्वा तम् आबध्य नष्टच् छाया रूपश् चरति ॥
Wherever one may happen to see the corpse, burnt or being burnt, of a Brāhman who maintained a sacrificial fire while alive, there one should fast for three nights. Then, one should make a bag out of the garment of the deceased, fill it with the ashes of the pyre, tie it up, and walk about as a phantom -like figure.
english translation
yatra brAhmaNam Ahita agniM dagdhaM dahyamAnaM vA pazyet tatra tri rAtra upoSitaH puSyeNa svayaM mRtasya vAsasA prasevaM kRtvA citA bhasmanA pUrayitvA tam Abadhya naSTac chAyA rUpaz carati ॥
hk transliteration by Sanscript