code: def test_notebook(notebook):
      fullfile = os.path.abspath(notebook)
      _, filename = os.path.split(fullfile)
      filename, _ = os.path.splitext(filename)
  
      if filename in KNOWN_FAILURES:
          pytest.skip(f"{filename} is known to fail")
      if filename in RPY2_NOTEBOOKS and not HAS_RPY2:
          pytest.skip(f"{filename} since rpy2 is not installed")
      if filename in JOBLIB_NOTEBOOKS and not JOBLIB_NOTEBOOKS:
          pytest.skip(f"{filename} since joblib is not installed")
  
      with open(fullfile, encoding="utf-8") as fp:
          nb = nbformat.read(fp, as_version=4)
  
      ep = ExecutePreprocessor(
          allow_errors=False, timeout=20, kernel_name=kernel_name
      )
      ep.preprocess(nb, {"metadata": {"path": NOTEBOOK_DIR}})
  
imports: import glob
  import os
  import sys
  import pytest
label_desc: Use image node_id 2 for calling a global function with example usage: test_notebook(notebook) without return types