import inspect


def get_annotations(func):
    """
    Return dict for parameter name and type.

    Parameters
    ----------
    func : Callable
        A function to get parameter name and type.
        The type must be specified as a type hint.

    Returns
    -------
    Dict
        Parameter name and type tuple.

    Examples
    --------
    >>> def test_func(a: int, b: str) -> int:
    ...     return a+1
    >>> get_annotations(test_func)
    {'a': <class 'int'>, 'b': <class 'str'>}

    >>> def test_func2(a: int, b) -> int:
    ...     return a+1
    >>> get_annotations(test_func)
    {'a': <class 'int'>, 'b': <class 'inspect._empty'>}
    """
    signature = inspect.signature(func)
    return {k: v.annotation for k, v in signature.parameters.items()}