code: def setup_tutorials():
      import pathlib
      import shutil
  
      def _copy_notebooks_and_create_rst(d_path, new_d_path, d_name):
          os.makedirs(new_d_path, exist_ok=True)
          list_notebooks = [
              f
              for f in os.listdir(d_path)
              if os.path.splitext(f)[-1] == ".ipynb"
          ]
          for notebook_f_name in list_notebooks:
              shutil.copyfile(
                  os.path.join(d_path, notebook_f_name),
                  os.path.join(new_d_path, notebook_f_name),
              )
  
          # RST file (see for example docs/overview.rst)
          rst_file = "\n".join(
              [
                  f"{d_name}",
                  "======================",
                  "",
                  ".. toctree::",
                  "    :maxdepth: 1",
                  "    :glob:",
                  "",
                  "    *",
                  "",
              ]
          )
          with open(os.path.join(new_d_path, "index.rst"), "w") as f:
              f.write(rst_file)
  
      docs_path = pathlib.Path(__file__).parent
      tutorials_path = os.path.join(docs_path.parent, "tutorial")
      tutorials_doc_path = os.path.join(docs_path, "tutorials")
  
      # Create a directory in shapash/docs/tutorials for each directory of shapash/tutorial
      # And copy each notebook file in it
      list_dir = [
          d
          for d in os.listdir(tutorials_path)
          if os.path.isdir(os.path.join(tutorials_path, d))
          and not d.startswith(".")
      ]
      for d_name in list_dir:
          d_path = os.path.join(tutorials_path, d_name)
          new_d_path = os.path.join(tutorials_doc_path, d_name)
          _copy_notebooks_and_create_rst(d_path, new_d_path, d_name)
  
      # Also copying all the overview tutorials (shapash/tutorial/shapash-overview-in-jupyter.ipynb for example)
      _copy_notebooks_and_create_rst(
          tutorials_path, tutorials_doc_path, "overview"
      )
  
imports: import os
  import sys
  import shapash
  import subprocess
label_desc: Use image node_id 1 for calling a global function with example usage: setup_tutorials() without return types