code: def get_pairs(self, format_string):
          
          for token in self.get_tokens(format_string):
              match = self.name_pattern.search(token)
              name = match.group(1) if match else None
              yield FormatStringToken(name=name, text=token)
docs: Tokenize a logging format string and extract field names from tokens.
  
          :param format_string: The logging format string.
          :returns: A generator of :class:`FormatStringToken` objects.