code: def list_notebooks(path="ipynb", skip=""):
      """All notebooks in the directory notebooks/path,
      or in the package itself"""
      if path == "ipynb":
          return (
              list_notebooks("ipynb_julia", skip=skip)
              + list_notebooks("ipynb_py", skip=skip)
              + list_notebooks("ipynb_R", skip=skip)
          )
  
      nb_path = SAMPLE_NOTEBOOK_PATH
  
      if path == "ipynb_all":
          return itertools.chain(
              *(
                  list_notebooks(folder.name, skip=skip)
                  for folder in nb_path.iterdir()
                  if folder.name.startswith("ipynb_")
              )
          )
  
      if path == "all":
          return itertools.chain(
              *(
                  list_notebooks(folder.name, skip=skip)
                  for folder in nb_path.iterdir()
              )
          )
  
      if path.startswith("."):
          nb_path = Path(__file__).parent / ".." / path
      else:
          nb_path = nb_path / path
  
      if skip:
          skip_re = re.compile(".*" + skip + ".*")
          return [
              str(nb_file)
              for nb_file in nb_path.iterdir()
              if nb_file.is_file() and not skip_re.match(nb_file.name)
          ]
  
      return [
          str(nb_file)
          for nb_file in nb_path.iterdir()
          if nb_file.is_file()
      ]
  
imports: import itertools
  import os.path
  import re
  import sys
  import unittest.mock
  from pathlib import Path
  import pytest
  from jupyter_client.kernelspec import find_kernel_specs, get_kernel_spec
  from nbformat.v4 import nbbase
  from nbformat.v4.nbbase import new_code_cell, new_markdown_cell, new_notebook, new_output
  import jupytext
  from jupytext.cell_reader import rst2md
  from jupytext.cli import system, tool_version
  from jupytext.formats import formats_with_support_for_cell_metadata
  from jupytext.myst import is_myst_available
  from jupytext.pandoc import is_pandoc_available
  from jupytext.quarto import is_quarto_available
label_desc: Use image node_id 9 for calling a global function with example usage: list_notebooks(path, skip) and returns: unknown, unknown, itertools, itertools, unknown