from typing import Callable
from typing import Dict
import inspect


def get_input_type_dict(func: Callable) -> Dict[str, type]:
    """
    Returns a dict like {argname: type} for given function inputs
    Examples:
        >>> @dataclass
        >>> class Base:
        >>>     ...
        >>> @dataclass
        >>> class Base2:
        >>>     ...
        >>> def func(x: int, y: Base) -> Base2:
        >>>     ...
        >>> assert get_output_type(func) == {"x": int, "y": Base}

    @param func: Callable[[...], Any]
    @return: dict like {argname: type}
    """
    return {
        arg_name: inspect.getfullargspec(func).annotations.get(arg_name, object)
        for arg_name in inspect.getfullargspec(func).args
    }