import inspect


def get_method_args_values(method, exclude=None):
    """Get arguments for a function or method and their default values.

    Parameters
    ----------
    method : function or method

    Returns
    -------
    args : dict

    """
    if exclude is None:
        exclude = set()
    args = {}
    inspected = inspect.signature(method)
    for parname, info in inspected.parameters.items():
        if parname not in {'self', 'kwargs'} and parname not in exclude:
            default_value = info.default
            if default_value == inspect._empty:
                default_value = None
            args[parname] = default_value
    return args