def is_static_method(method, klass):
    """Returns True if method is an instance method of klass."""
    for c in klass.mro():
        if name(method) in c.__dict__:
            return isinstance(c.__dict__[name(method)], staticmethod)
    else:
        return False
Returns True if method is an instance method of klass.
src/watchdog/utils/echo.py