def METHOD_NAME(hint: Type[Any], preserve_new_types: bool = False) -> Type[Any]:
    """Gets the inner type from Literal, Optional, Final and NewType
    Args:
        hint (Type[Any]): Type to extract
        preserve_new_types (bool): Do not extract supertype of a NewType
    Returns:
        Type[Any]: Inner type if hint was Literal, Optional or NewType, otherwise hint
    """
    if is_literal_type(hint):
        # assume that all literals are of the same type
        return METHOD_NAME(type(get_args(hint)[0]), preserve_new_types)
    if is_optional_type(hint) or is_final_type(hint):
        # extract specialization type and call recursively
        return METHOD_NAME(get_args(hint)[0], preserve_new_types)
    if is_newtype_type(hint) and not preserve_new_types:
        # descend into supertypes of NewType
        return METHOD_NAME(hint.__supertype__, preserve_new_types)
    return hint