code: def subgroup(self, t, i):
          
  
          current = []
  
          # (?flags)
          flags = self.get_flags(i)
          if flags:
              self.flags(flags[2:-1])
              return [flags]
  
          # (?#comment)
          comments = self.get_comments(i)
          if comments:
              return [comments]
  
          verbose = self.verbose
          unicode_flag = self.unicode
  
          # (?flags:pattern)
          flags = self.get_flags(i, True)
          if flags:  # pragma: no cover
              t = flags
              self.flags(flags[2:-1], scoped=True)
  
          current = []
          try:
              while t != ')':
                  if not current:
                      current.append(t)
                  else:
                      current.extend(self.normal(t, i))
  
                  t = next(i)
          except StopIteration:
              pass
  
          # Restore flags after group
          self.verbose = verbose
          self.unicode = unicode_flag
  
          if t == ")":
              current.append(t)
          return current
docs: Handle parenthesis.