code: def state_subpattern(self, value):
          
          num, *_, parsed = value
          if num in self.groups:
              return (yield required(self.groups[num]))
  
          yield from Traverser(parsed, groups=self.groups)
docs: Parse subpatterns.