class_docstr: A class that can read notebook cells from their text representation
class_docstr_tok: ["A","class","that","can","read","notebook","cells","from","their","text","representation"]
code: def extract_content(self, lines):
      # Code cells with just a multiline string become Markdown cells
      if self.ext == ".py" and not is_active(
          self.ext, self.metadata, self.cell_type == "code"
      ):
          content = "\n".join(lines).strip()
          for prefix in [""] if self.ext != ".py" else ["", "r", "R"]:
              for triple_quote in ['"""', "'''"]:
                  left = prefix + triple_quote
                  right = triple_quote
                  if (
                      content.startswith(left)
                      and content.endswith(right)
                      and len(content) >= len(left + right)
                  ):
                      content = content[len(left) : -len(right)]
                      # Trim first/last line return
                      if content.startswith("\n"):
                          content = content[1:]
                          left = left + "\n"
                      if content.endswith("\n"):
                          content = content[:-1]
                          right = "\n" + right
  
                      if not prefix:
                          if len(left) == len(right) == 4:
                              self.metadata["cell_marker"] = left[:3]
                      elif len(left[1:]) == len(right) == 4:
                          self.metadata["cell_marker"] = left[:4]
                      else:
                          self.metadata["cell_marker"] = (
                              left + "," + right
                          )
                      return content.splitlines()
  
      if not is_active(self.ext, self.metadata) or (
          "active" not in self.metadata
          and self.language
          and self.language != self.default_language
      ):
          return uncomment(
              lines,
              self.comment if self.ext not in [".r", ".R"] else "#",
          )
  
      return self.uncomment_code_and_magics(lines)
  
imports: import re
  import warnings
  from copy import copy
  from nbformat.v4.nbbase import new_code_cell, new_markdown_cell, new_raw_cell
  from packaging.version import parse
  from .doxygen import doxygen_to_markdown
  from .languages import _SCRIPT_EXTENSIONS
  from .cell_metadata import is_active, is_json_metadata, rmd_options_to_metadata, text_to_metadata
  from .languages import _JUPYTER_LANGUAGES_LOWER_AND_UPPER
  from .magics import is_magic, need_explicit_marker, uncomment_magic, unescape_code_start
  from .pep8 import pep8_lines_between_cells
  from .stringparser import StringParser
label_desc: Use image node_id 8 for calling the BaseCellReader obj's underlying member method code with example usage: obj.extract_content(lines) and returns: self, uncomment, content