from typing import OrderedDict
import inspect


def inspect_fn(fn):
    """
    Inspect arguments of a function

    Args:
        fn: a function to inspect

    Returns:
        - an ordered dict with arguments and defaulted values
    """
    args = OrderedDict()
    signature = inspect.signature(fn)
    for key, val in signature.parameters.items():
        if key not in ['args', 'kwargs']:
            args[key] = val.default
    return args