How does Confucius view the social function of poetry?

The most wonderful thing in Confucius' literary thought is his pertinent summary of the social function of poetry.

Confucius strongly advocated "poetry teaching", combining literature, art and political morality, taking ritual and music education as an important means to improve politics, transform society and cultivate temperament, and taking the study of ritual and music poems as the basis of people's moral cultivation. He suggested that to be a perfect person, we should "inspire by poetry, have a ceremony and have fun" (Taber). Confucius injected the emerging consciousness of "benevolence" into the old form of rites and music, which made it have more specific connotations. He said, "What's the fun of being heartless?" (Bashu) means that without benevolence, rites and music lose their meaning. He said, "Rhyme, Rhyme, how about bells and drums?" (Yang Huo) Machimi Confucius attached great importance to the moral education function of poetry and music, and disapproved of using literature and art as pure entertainment tools or decorative decorations.