How can I calculate a hash for a filesystem-directory using Python?

How can I calculate a hash for a filesystem-directory using Python?

More to explore

Based on this image's title: “How can I calculate a hash for a filesystem-directory using Python?