code: def parse_extend(self, c, i):
          
  
          # Start list parsing
          success = True
          index = i.index
          list_type = c
          try:
              c = next(i)
              if c != '(':
                  raise StopIteration
              while c != ')':
                  c = next(i)
  
                  if self.extend and c in EXT_TYPES and self.parse_extend(c, i):
                      continue
  
                  if c == '\\':
                      try:
                          self._references(i)
                      except StopIteration:
                          pass
                  elif c == '[':
                      index = i.index
                      try:
                          self._sequence(i)
                      except StopIteration:
                          i.rewind(i.index - index)
  
          except StopIteration:
              success = False
              c = list_type
              i.rewind(i.index - index)
  
          return success
docs: Parse extended pattern lists.