def METHOD_NAME(feature: NumpyDict, **kwargs) -> NumpyDict:
    assert len(kwargs) == 1, f'wrong usage of filter with kwargs: {kwargs}'
    if 'desired_keys' in kwargs:
        feature = {
            k: v
            for k, v in feature.items() if k in kwargs['desired_keys']
        }
    elif 'required_keys' in kwargs:
        for k in kwargs['required_keys']:
            assert k in feature, f'cannot find required key {k}.'
    elif 'ignored_keys' in kwargs:
        feature = {
            k: v
            for k, v in feature.items() if k not in kwargs['ignored_keys']
        }
    else:
        raise AssertionError(f'wrong usage of filter with kwargs: {kwargs}')
    return feature