Manual addition of filter set
        :param filter_name: str
        :param filter_set: list
        :param cached: bool
191789
def add_filter_set(self, filter_name, filter_set, cached=True):
        
        try:
            hash(filter_name)
        except TypeError as err:
            raise ValueError('Filter set name must be as instance of hashable type: %s' % str(err))

        if not isinstance(filter_set, list):
            raise ValueError('Filters must be a list.')

        if len(filter_set) == 0:
            raise ValueError('Filters count must be greater than 0.')

        for filter_instance in filter_set:
            if not isinstance(filter_instance, ImagineFilterInterface):
                raise ValueError('All filters must implement of ImagineFilterInterface.')

        if not isinstance(cached, bool):
            raise ValueError('Cached parameter must be a bool.')

        filter_config = {
            'filters': filter_set,
            'cached': cached
        }

        if filter_name not in self._filter_sets:
            self._filter_sets.update({filter_name: filter_config})
        else:
            raise ValueError('Duplicate filter set name.')
200635
public void addFilter(String name, String value)
    {
        if(this.filters == null)
            this.filters = new HashMap<String,String>();
        this.filters.put(name, value);
    }
435135
def cyvcf_remove_filter(rec, name):
    
    if rec.FILTER:
        filters = rec.FILTER.split(";")
    else:
        filters = []
    new_filters = [x for x in filters if not str(x) == name]
    if len(new_filters) == 0:
        new_filters = ["PASS"]
    rec.FILTER = new_filters
    return rec
1319283
def push_filters(self, new_filters):
        
        t = self.tokenizer
        for f in new_filters:
            t = f(t)
        self.tokenizer = t
677718
def filters(self):
        
        params = {}
        for _filter in self._filters:
            params.update(_filter)

        return params
265781
private FilterList getFilterList(Filter filters)
    {
        FilterList filterList = null;
        if (filters != null)
        {
            if (FilterList.class.isAssignableFrom(filters.getClass()))
            {
                filterList = (FilterList) filters;
            }
            else
            {
                filterList = new FilterList();
                filterList.addFilter(filters);
            }
        }
        return filterList;
    }
716008
public static cachepolicy[] get_filtered(nitro_service service, String filter) throws Exception{
		cachepolicy obj = new cachepolicy();
		options option = new options();
		option.set_filter(filter);
		cachepolicy[] response = (cachepolicy[]) obj.getfiltered(service, option);
		return response;
	}
510189
public FilterRegistration.Dynamic addFilter(String name, Filter filter) {
        return addFilter(name, new FilterHolder(requireNonNull(filter)));
    }
1216047
def by_name(queryset, name=None):
  
  if name:
    queryset = queryset.filter(name=name)
  return queryset
779698
def filter_out(queryset, setting_name):
  
  kwargs = helpers.get_settings().get(setting_name, {}).get('FILTER_OUT', {})
  queryset = queryset.exclude(**kwargs)
  return queryset
1221889
def set_filter_raw(self, filter_raw):
        """"""

        self.filter_raw = filter_raw

        self.filter_raw_dict = []
        splitted = re.compile(FILTER_SEPARATOR).split(filter_raw)
        for fltr_raw in splitted:
            fltr = self.__process_filter(fltr_raw)

            self.filter_raw_dict.append(fltr)
55132
def logging_set_filter(name, filter_def, ttl, **kwargs):
    
    ctx = Context(**kwargs)
    ctx.execute_action('logging:set_filter', **{
        'logging_service': ctx.repo.create_secure_service('logging'),
        'logger_name': name,
        'filter_def': filter_def,
        'ttl': ttl,
    })
888797
def set_filters(self, filters):
        
        if not isinstance(filters, dict):
            raise Exception("filters must be a dict")
        self.filters = {}
        for key in filters.keys():
            value = filters[key]
            self.add_filter(key,value)
951422
public static cachepolicylabel[] get_filtered(nitro_service service, String filter) throws Exception{
		cachepolicylabel obj = new cachepolicylabel();
		options option = new options();
		option.set_filter(filter);
		cachepolicylabel[] response = (cachepolicylabel[]) obj.getfiltered(service, option);
		return response;
	}
540069
def load_cache():
    
    if not os.path.exists(settings.DUP_FILTER_FILE):
        return set()

    with open(settings.DUP_FILTER_FILE) as f:
        return set(
            json.loads(f.read())
        )
508685
def cyvcf_add_filter(rec, name):
    
    if rec.FILTER:
        filters = rec.FILTER.split(";")
    else:
        filters = []
    if name not in filters:
        filters.append(name)
        rec.FILTER = filters
    return rec
512969
def filtered_dir(module_name, *, additions={}, **kwargs):
    
    module = importlib.import_module(module_name)

    def __dir__():
        attr_names = set(filtered_attrs(module, **kwargs))
        attr_names.update(additions)
        return sorted(attr_names)

    return __dir__