code: def dict(self):
          
          res = copy(self)
          if MATCHES in res:
              del res[MATCHES]
          if NAME in res:
              del res[NAME]
          res = {self.name: res}
          for k, v in self.matches.items():
              res[k] = v
              if NAME in res[k]:
                  del res[k][NAME]
          return res
docs: Dictionary representing this match and all child symbol matches.