code: def count_lines_to_next_cell(
      cell_end_marker, next_cell_start, total, explicit_eoc
  ):
      """How many blank lines between end of cell marker and next cell?"""
      if cell_end_marker < total:
          lines_to_next_cell = next_cell_start - cell_end_marker
          if explicit_eoc:
              lines_to_next_cell -= 1
          if next_cell_start >= total:
              lines_to_next_cell += 1
          return lines_to_next_cell
  
      return 1
  
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 a global function with example usage: count_lines_to_next_cell(cell_end_marker, next_cell_start, total, explicit_eoc) and returns: int, lines_to_next_cell