@curry
def _filter_kwargs(names, dict_):
 return {k: v for (k, v) in dict_.items() if ((k in names) and (v is not None))}

@ curry def _filter_kwargs ( names , dict_ ) : return { k : v for ( k , v ) in dict_ . items ( ) if ( ( k in names ) and ( v is not None ) ) }
filter out kwargs from a dictionary .