code: def same_content(
      ref_source, test_source, allow_removed_final_blank_line
  ):
      """Is the content of two cells the same, except for an optional final blank line?"""
      if ref_source == test_source:
          return True
  
      if not allow_removed_final_blank_line:
          return False
  
      # Is ref identical to test, plus one blank line?
      ref_source = ref_source.splitlines()
      test_source = test_source.splitlines()
  
      if not ref_source:
          return False
  
      if ref_source[:-1] != test_source:
          return False
  
      return _BLANK_LINE.match(ref_source[-1])
  
imports: import difflib
  import json
  import os
  import re
  from jupytext.paired_paths import full_path
  from .cell_metadata import _IGNORE_CELL_METADATA
  from .combine import combine_inputs_with_outputs
  from .formats import check_auto_ext, long_form_one_format
  from .header import _DEFAULT_NOTEBOOK_METADATA
  from .jupytext import read, reads, write, writes
  from .metadata_filter import filter_metadata
label_desc: Use image node_id 5 for calling a global function with example usage: same_content(ref_source, test_source, allow_removed_final_blank_line) and returns: _BLANK_LINE, True, False, False, False