How to check whether a method exists in Python?,"hasattr(Dynamo, 'mymethod') and callable(getattr(Dynamo, 'mymethod'))"