import inspect


def _is_method(obj, method):
    """Returns True if a given method is obj's method.

    You can not simply test a given method like:

    return inspect.ismethod(method)

    This is because functools.wraps converts the method to a function
    in log_method_call function.
    """
    return inspect.ismethod(getattr(obj, method.__name__, None))