<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def relevant_kwargs(function, exclude_keys='self', exclude_values=None, extra_values=None):
 """ This will return a dictionary of local variables that are parameters to the function provided in the arg. Example: function(**relevant_kwargs(function)) :param function: function to select parameters for :param exclude_keys: str,list,func if not a function it will be converted into a funciton, defaults to excluding None :param exclude_values: obj,list,func if not a function it will be convereted into one, defaults to excluding 'self' :param extra_values: dict of other values to include with local :return: dict of local variables for the function """

    args = function_args(function)
    locals_values = function_kwargs(function_index=2, exclude_keys=exclude_keys)
    if extra_values:
        locals_values.update(extra_values)
    return {k: v for k, v in locals_values.items() if k in args}