code: def is_negative(pattern, flags):
      
  
      if flags & MINUSNEGATE:
          return flags & NEGATE and pattern[0:1] in MINUS_NEGATIVE_SYM
      else:
          return flags & NEGATE and pattern[0:1] in NEGATIVE_SYM
docs: Check if negative pattern.