Object lesson
An object lesson was a living example of a concept or conclusion.
In 2267, James T. Kirk explained to Spock that the Vaal situation on Gamma Trianguli VI was an object lesson about what happened when you allowed a machine to take over. (TOS: "The Apple")