Update visitor.py

Update, but it has not been tested yet.
The work on the type in the find_method is not really pretty.