def __format_doc(self):
    """
    Format the documentation defined for the current method into lines of text.
    Each line if no longer that 70 characters.

    Returns:
      A formatted string consisting of multiple lines of text.
    """
    counter = 0
    doc_list = list(self.doc.replace('\n', ' '))
    for i in range(0, len(doc_list)):
      if doc_list[i] == ' ' and counter > 70:
        doc_list[i] = '\n'
        counter = 0
      counter += 1
    return ''.join(doc_list)
dataset/ETHPy150Open hiranya911/rest-coder/python-lib/codegen_core.py/Method.__format_doc/original