def METHOD_NAME(obj: Any) -> dict[str, type]:
    """Get type parameters for a generic class.
    Parameters
    ----------
    obj
        Generic class to get type parameters for.
    Returns
    -------
    Mapping of type parameter name to type.
    Examples
    --------
    >>> from typing import Dict, List
    >>>
    >>> class MyList(List[T]): ...
    >>>
    >>> get_type_params(MyList[int])
    {'T': <class 'int'>}
    >>>
    >>> class MyDict(Dict[T, U]): ...
    >>>
    >>> get_type_params(MyDict[int, str])
    {'T': <class 'int'>, 'U': <class 'str'>}
    """
    args = get_args(obj)
    origin = get_origin(obj) or obj
    bases = getattr(origin, "__orig_bases__", ())
    params = getattr(origin, "__parameters__", ())
    result = {}
    for base in bases:
        result.update(METHOD_NAME(base))
    param_names = (p.__name__ for p in params)
    result.update(zip(param_names, args))
    return result