A similar tool, Vulture, exists for Python: https://github.com/jendrikseipp/vulture
I haven't used it yet myself, but discovered it during a search inspired by this post and thought it would be worth sharing. Definitely a trickier problem to solve for dynamic languages, but looks useful.