Legends in graphviz

I have a graph with nodes the are colored based on a classification.

I would like to show in the corner of the plot what each color classification.

Is that possible?

If there is a python example… what would be great…

Use the built-in search and you will find several Legend solutions