from typing import Any


def get_type_name(t: Any) -> str:
    """Find the name of a type passed. It will look in sequence for "__name__" and "_name" and if both fail it will
    take the str(t)

    Args:
        t: Any object

    Returns:
        String: string with the name of the type
    """
    return getattr(t, '__name__', getattr(t, '_name', str(t)))