import inspect


def reduce_parameters(func, parameters):
    """
    Reduce a set of parameters, given in a form of dictionary, to the
    set of parameters, that are required by the function.
    :param func: Function, that requires a subset of parameters given as second argument.
    :param parameters: dict, a set of parameters, that yields a subset of parameters,
                       that is required by the func parameter.
    :return: dict, the subset of parameters for the 'func' function.
    """
    func_params = {}
    for parameter in inspect.signature(func).parameters.keys():
        func_params[parameter] = parameters[parameter]

    return func_params