def _ParseOrMerge(self, lines, message):
    """Converts a text representation of a protocol message into a message.

    Args:
      lines: Lines of a message's text representation.
      message: A protocol buffer message to merge into.

    Raises:
      ParseError: On text parsing problems.
    """
    # Tokenize expects native str lines.
    str_lines = (
        line if isinstance(line, str) else line.decode('utf-8')
        for line in lines)
    tokenizer = Tokenizer(str_lines)
    while not tokenizer.AtEnd():
      self._MergeField(tokenizer, message)
Converts a text representation of a protocol message into a message.

    Args:
      lines: Lines of a message's text representation.
      message: A protocol buffer message to merge into.

    Raises:
      ParseError: On text parsing problems.
    
deps/protobuf/python/google/protobuf/text_format.py