def nipsa_filter(userid=None):
    # If any one of these "should" clauses is true then the annotation will
    # get through the filter.
    should_clauses = [{"not": {"term": {"nipsa": True}}}]

    if userid is not None:
        # Always show the logged-in user's annotations even if they have nipsa.
        should_clauses.append({"term": {"user": userid}})

    return {"bool": {"should": should_clauses}}
Delete a new service group
dataset/ETHPy150Open hypothesis/h/h/nipsa/search.py/nipsa_filter--crossover with--dataset/ETHPy150Open saltstack/salt/salt/modules/netscaler.py/servicegroup_delete