code: def _test_run_notebook(folder, notebook_fname, n_cells):
      # Change to notebook directory to allow for testing
      cwd = os.getcwd()
      os.chdir(
          os.path.join(
              this_file_dir(), "..", "..", "docs", "notebooks", folder
          )
      )
      with testbook(notebook_fname, timeout=500, execute=True) as tb:
          assert tb.code_cells_executed == n_cells
      os.chdir(cwd)
  
file_path: OMLT/tests/notebooks/test_run_notebooks.py
imports: import os
  import pytest
  from pyomo.common.fileutils import this_file_dir
  from testbook import testbook
  from omlt.dependencies import keras_available, onnx_available
label_desc: Use image node_id 1 for calling a global function with example usage: _test_run_notebook(folder, notebook_fname, n_cells) without return types