def _follow_inheritance(cls, attr):
    """Find where an attribute comes from originally."""
    for base in cls.mro()[1:]:
        if hasattr(base, attr):
            return _follow_inheritance(base, attr)

    # Not found in any bases, must be defined here
    return cls