class_docstr: A class that can represent a notebook cell as a
  Sphinx Gallery script (#80)
class_docstr_tok: ["A","class","that","can","represent","a","notebook","cell","as","a","Sphinx","Gallery","script","(","#","80",")"]
docstr: Return the text representation for the cell
code: def cell_to_text(self):
      """Return the text representation for the cell"""
      if self.cell_type == "code":
          source = copy(self.source)
          return comment_magic(
              source, self.language, self.comment_magics
          )
  
      if "cell_marker" in self.metadata:
          cell_marker = self.metadata.pop("cell_marker")
      else:
          cell_marker = self.default_cell_marker
  
      if self.source == [""]:
          return (
              [cell_marker] if cell_marker in ['""', "''"] else ['""']
          )
  
      if cell_marker in ['"""', "'''"]:
          return [cell_marker] + self.source + [cell_marker]
  
      return [
          cell_marker
          if cell_marker.startswith("#" * 20)
          else self.default_cell_marker
      ] + comment_lines(self.source, self.comment, self.comment_suffix)
  
imports: import re
  import warnings
  from copy import copy
  from .cell_metadata import _IGNORE_CELL_METADATA, is_active, metadata_to_double_percent_options, metadata_to_rmd_options, metadata_to_text
  from .cell_reader import LightScriptCellReader, MarkdownCellReader, RMarkdownCellReader
  from .doxygen import markdown_to_doxygen
  from .languages import _SCRIPT_EXTENSIONS, cell_language, comment_lines, same_language
  from .magics import comment_magic, escape_code_start, need_explicit_marker
  from .metadata_filter import filter_metadata
  from .pep8 import pep8_lines_between_cells
label_desc: Use image node_id 2 for calling the SphinxGalleryCellExporter obj's underlying member method code with example usage: obj.cell_to_text() and returns: unknown, comment_magic, unknown, unknown