class_docstr: A Python notebook reader.
code: def _remove_comments(self, lines):
      new_lines = []
      for line in lines:
          if line.startswith("#"):
              new_lines.append(line[2:])
          else:
              new_lines.append(line)
      text = "\n".join(new_lines)
      text = text.strip("\n")
      return text
  
file_path: nbformat/nbformat/v2/nbpy.py
imports: from __future__ import annotations
  import re
  from .nbbase import new_code_cell, new_notebook, new_text_cell, new_worksheet
  from .rwbase import NotebookReader, NotebookWriter
label_desc: Use image node_id 4 for calling the PyReader obj's underlying member method code with example usage: obj._remove_comments(lines) and returns: text