The sentence "The party dies as soon as she left" is an example of personification, a type of figurative language. By assigning human qualities to an inanimate object or concept (in this case, the "party"), the author is able to create a more vivid and memorable image in the reader's mind.
In this case, the personification suggests that the party was a living thing that could "die," or cease to exist, without the presence of the person who left. This creates a sense of loss or emptiness that the other guests at the party might feel, and it also emphasizes the importance of the person who left in creating a lively and enjoyable atmosphere.
Overall, the use of personification in this sentence helps to convey a complex idea or emotion in a concise and memorable way.