import inspect


def kwargs_sep(fcn, kwargs):
    """Used to separate kwargs for multiple different functions
    Args:
        fcn: function
        kwargs: dict of keyword args 
    Returns:
        dict for fcn keywords contained in kwargs"""
    
    #list of fcn argument names
    fcn_args = [key for key, val in inspect.signature(fcn).parameters.items()]
    #dict of kwargs for fcn
    fcn_kwargs = {key: kwargs[key] for key in kwargs if key in fcn_args}
    return fcn_kwargs