code: def same_content(ref, test, endswith=False):
      """Is the content of two cells the same, up to reformatting by black"""
      ref = black_invariant(ref)
      test = black_invariant(test)
  
      if endswith and test:
          return ref.endswith(test)
      return ref == test
  
file_path: jupytext/src/jupytext/combine.py
imports: import re
  from copy import copy
  from nbformat import NotebookNode
  from .cell_metadata import _IGNORE_CELL_METADATA
  from .formats import long_form_one_format
  from .header import _DEFAULT_NOTEBOOK_METADATA
  from .metadata_filter import restore_filtered_metadata
label_desc: Use image node_id 2 for calling a global function with example usage: same_content(ref, test, endswith) and returns: unknown, ref