code: def filter_edge_field_non_existence(edge_expression):
      
      # When an edge does not exist at a given vertex, OrientDB represents that in one of two ways:
      #   - the edge's field does not exist (is null) on the vertex document, or
      #   - the edge's field does exist, but is an empty list.
      # We check both of these possibilities.
      if not isinstance(edge_expression, (LocalField, GlobalContextField)):
          raise AssertionError(u'Received invalid edge_expression {} of type {}.'
                               u'Expected LocalField or GlobalContextField.'
                               .format(edge_expression, type(edge_expression).__name__))
      if isinstance(edge_expression, LocalField):
          if not is_vertex_field_name(edge_expression.field_name):
              raise AssertionError(u'Received LocalField edge_expression {} with non-edge field_name '
                                   u'{}.'.format(edge_expression, edge_expression.field_name))
  
      field_null_check = BinaryComposition(u'=', edge_expression, NullLiteral)
  
      local_field_size = UnaryTransformation(u'size', edge_expression)
      field_size_check = BinaryComposition(u'=', local_field_size, ZeroLiteral)
  
      return BinaryComposition(u'||', field_null_check, field_size_check)
docs: Return an Expression that is True iff the specified edge (edge_expression) does not exist.