code: def match_examples(self, parse_fn, examples):
          
          assert self.state is not None, "Not supported for this exception"
  
          candidate = None
          for label, example in examples.items():
              assert not isinstance(example, STRING_TYPE)
  
              for malformed in example:
                  try:
                      parse_fn(malformed)
                  except UnexpectedInput as ut:
                      if ut.state == self.state:
                          try:
                              if ut.token == self.token:  # Try exact match first
                                  return label
                          except AttributeError:
                              pass
                          if not candidate:
                              candidate = label
  
          return candidate
docs: Given a parser instance and a dictionary mapping some label with
              some malformed syntax examples, it'll return the label for the
              example that bests matches the current error.