code: def test_raise_on_different_cell_count(raise_on_first_difference):
      ref = new_notebook(cells=[new_code_cell("1")])
      test = new_notebook(
          cells=[new_code_cell("1"), new_code_cell("2")]
      )
      with pytest.raises(NotebookDifference):
          compare_notebooks(
              test,
              ref,
              "py:light",
              raise_on_first_difference=raise_on_first_difference,
          )
  
      with pytest.raises(NotebookDifference):
          compare_notebooks(
              ref,
              test,
              "py:light",
              raise_on_first_difference=raise_on_first_difference,
          )
  
imports: import pytest
  from nbformat.v4.nbbase import new_code_cell, new_markdown_cell, new_notebook, new_raw_cell
  from jupytext.compare import NotebookDifference, compare, compare_cells, compare_notebooks
  from jupytext.compare import test_round_trip_conversion
label_desc: Use image node_id 11 for calling a global function with example usage: test_raise_on_different_cell_count(raise_on_first_difference) without return types