class_docstr: A class that represent a notebook cell as a Python or Julia script
class_docstr_tok: ["A","class","that","represent","a","notebook","cell","as","a","Python","or","Julia","script"]
docstr: Remove end of cell marker when next cell has an explicit start marker
code: def remove_eoc_marker(self, text, next_text):
      """Remove end of cell marker when next cell has an explicit start marker"""
      if self.cell_marker_start:
          return text
  
      if self.is_code() and text[-1] == self.comment + " -":
          # remove end of cell marker when redundant with next explicit marker
          if not next_text or next_text[0].startswith(
              self.comment + " +"
          ):
              text = text[:-1]
              # When we do not need the end of cell marker, number of blank lines is the max
              # between that required at the end of the cell, and that required before the next cell.
              if self.lines_to_end_of_cell_marker and (
                  self.lines_to_next_cell is None
                  or self.lines_to_end_of_cell_marker
                  > self.lines_to_next_cell
              ):
                  self.lines_to_next_cell = (
                      self.lines_to_end_of_cell_marker
                  )
          else:
              # Insert blank lines at the end of the cell
              blank_lines = self.lines_to_end_of_cell_marker
              if blank_lines is None:
                  # two blank lines when required by pep8
                  blank_lines = pep8_lines_between_cells(
                      text[:-1], next_text, self.ext
                  )
                  blank_lines = 0 if blank_lines < 2 else 2
              text = text[:-1] + [""] * blank_lines + text[-1:]
  
      return text
  
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 5 for calling the LightScriptCellExporter obj's underlying member method code with example usage: obj.remove_eoc_marker(text, next_text) and returns: text, text