def _ ( f , x ) : return { k : v for k , v in x . items ( ) if f ( k , v ) }
usinf filter on dictionary python
filter for dict note f should have signature : f :: key - > value - > bool
def _(f, x):
    """
    filter for dict, note `f` should have signature: `f::key->value->bool`
    """
    return {k: v for k, v in x.items() if f(k, v)}