from typing import Any


def get_origin(obj: Any) -> Any:
    """Returns an original object.

    Examples:
        >>> class A:
        ...    @property
        ...    def x(self):
        ...        pass
        >>> hasattr(A.x, __name__)
        False
        >>> get_origin(A.x).__name__
        'x'
    """
    if isinstance(obj, property):
        return get_origin(obj.fget)
    if not callable(obj):
        return obj
    if hasattr(obj, "__wrapped__"):
        return get_origin(obj.__wrapped__)
    if hasattr(obj, "__pytest_wrapped__"):
        return get_origin(obj.__pytest_wrapped__.obj)
    return obj