def auto_kwargs(function):
 supported = introspect.arguments(function)
 @wraps(function)
 def call_function(*args, **kwargs):
  return function(*args, **{key: value for (key, value) in kwargs.items() if (key in supported)})
 return call_function

def auto_kwargs ( function ) : supported = introspect . arguments ( function ) @ wraps ( function ) def call_function ( * args , ** kwargs ) : return function ( * args , ** { key : value for ( key , value ) in kwargs . items ( ) if ( key in supported ) } ) return call_function
modifies the provided function to support kwargs by only passing along kwargs for parameters it accepts .