def METHOD_NAME(cls, hook, mro=False):
    """
    Returns ``True`` if a class has implemented a method or ``False`` if it has inherited
    it.
    :param cls: Class to inspect.
    :type cls: class
    :param hook: Name of the hook to look for.
    :type hook: str
    """
    if not mro:
        return hook in vars(cls)
    else:
        class NotDefined:
            pass
        return getattr(cls, hook, NotDefined) is not getattr(object, hook, NotDefined)