code: def FlipAllowed(self):
      
      if not hasattr(self, 'flipped'):
        raise errors.ParseError('Not defined.')
  
      if not self.flipped:
        return
  
      if self.current_expression.operator:
        if not self.current_expression.operator.lower() in (
            'is', 'contains', 'inset', 'equals'):
          raise errors.ParseError(
              'Keyword \'not\' does not work against operator: {0:s}'.format(
                  self.current_expression.operator))
docs: Raise an error if the not keyword is used where it is not allowed.