Return True if we have a filter directive whose operator applies to the outer scope.

def is_filter_with_outer_scope_vertex_field_operator(directive):
    """Return True if we have a filter directive whose operator applies to the outer scope."""
    if directive.name.value != 'filter':
        return False

    op_name, _ = _get_filter_op_name_and_values(directive)
    return op_name in OUTER_SCOPE_VERTEX_FIELD_OPERATORS