def is_bound_method(method):
    return ((is_instancemethod(method) and (method.im_self is not None)) or (hasattr(method, '__self__') and (method.__self__ is not None)))
def is_bound_method(method):
    return ((is_instancemethod(method) and (method.im_self is not None)) or (hasattr(method, '__self__') and (method.__self__ is not None)))