from typing import Type
from typing import List
from typing import Any
from typing import Set
from typing import FrozenSet
from typing import Tuple
from typing import Dict


def hintify(type_: Type) -> Type:
    """
    Convert a real type into an appropriate type hint (or leave it unchanged, if not needed)

    :param type_:                       the type to hintify
    """
    # XXX: this clearly isn't ideal
    types = {
        list: List[Any],
        set: Set[Any],
        frozenset: FrozenSet[Any],
        tuple: Tuple[Any, ...],
        dict: Dict[Any, Any]
    }
    return types.get(type_) or type_