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