import types


def normaliseArgs(func: types.FunctionType, args: list, kwargs: dict) -> dict:
    """
    Merges args and kwargs into a single dict.

    :param func: Function whose arguments to match against.
    :param args: Positional arguments that coincide with func's parameters.
    :param kwargs: Keyword arguments that coincide with func's parameters.
    :return: Dict indexed on funcs parameter names with the values of args and kwargs.
        kwargs will override any conflicts with args.
    """
    mergedArgs = dict(zip(func.__code__.co_varnames[:func.__code__.co_argcount], args))
    mergedArgs.update(kwargs)
    return mergedArgs