Cosmo is a character from Sonic X. She is a female child of a plant-like alien species whose homeworld was destroyed by the villainous Metarex. She is an ally of Sonic the Hedgehog and his friends, and it is widely accepted that her primary purpose in the series is that of a love interest for Tails, the two characters being of the same age and displaying an overt fondness for one another.
Even thoes Sonic X a Kid Friendly Show, There is a Sad Moment where Cosmo sacrificed herself to Killed the Dark Oak by fusing herself with the Dark Oak planet to make it weaker so that Tails, Super Sonic and Super Shadow could destroy it and save the universe.
She is resurrected in the future thanks to Tubby to make Tails happy and to marry him, but she soon found out that Tails had a sex change operation during her dead.