def is_classmethod(instancemethod, klass):
 return (inspect.ismethod(instancemethod) and (instancemethod.__self__ is klass))

def is_classmethod ( instancemethod , klass ) : return ( inspect . ismethod ( instancemethod ) and ( instancemethod . __self__ is klass ) )
determine if an instancemethod is a classmethod .