class_docstr: Read notebook cells from Spyder/VScode scripts (#59)
class_docstr_tok: ["Read","notebook","cells","from","Spyder\/VScode","scripts","(","#","59",")"]
docstr: Return position of end of cell marker, and position
  of first line after cell
docstr_tok: ["Return","position","of","end","of","cell","marker",",","and","position","of","first","line","after","cell"]
code: def find_cell_end(self, lines):
      """Return position of end of cell marker, and position
      of first line after cell"""
  
      if self.metadata and "cell_type" in self.metadata:
          self.cell_type = self.metadata.pop("cell_type")
      elif not is_active(".ipynb", self.metadata):
          if self.metadata.get("active") == "":
              del self.metadata["active"]
          self.cell_type = "raw"
          self.comment = ""
      else:
          self.cell_type = "code"
  
      next_cell = len(lines)
      parser = StringParser(self.language or self.default_language)
      for i, line in enumerate(lines):
          if parser.is_quoted():
              parser.read_line(line)
              continue
  
          parser.read_line(line)
          if i > 0 and (
              self.start_code_re.match(line)
              or self.alternative_start_code_re.match(line)
          ):
              next_cell = i
              break
  
      if last_two_lines_blank(lines[:next_cell]):
          return next_cell - 2, next_cell, False
      if next_cell > 0 and _BLANK_LINE.match(lines[next_cell - 1]):
          return next_cell - 1, next_cell, False
      return next_cell, next_cell, False
  
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 4 for calling the DoublePercentScriptCellReader obj's underlying member method code with example usage: obj.find_cell_end(lines) and returns: next_cell,  next_cell,  False, unknown,  next_cell,  False, unknown,  next_cell,  False