@classmethod
def __instancehook__(cls, other):
    """Check if the other instance implements the interface."""
    for attribute in cls.__abstractmethods__:
        if not hasattr(other, attribute):
            return NotImplemented
    return True
