import inspect


def kwargs_overlap(paramaterized, func):
    """
    Gets the intersection between the parameters of a ``param.Parameterized`` class and
    the keyword arguments of a function, and returns the current intersection
    and their values as a dictionary.
    """
    key_set = set(inspect.signature(func).parameters.keys()
                  ).intersection(set(paramaterized.param.objects().keys()))
    return {key: getattr(paramaterized, key) for key in key_set}