code: def test_not_on_path(tmpdir):
      a = tmpdir.mkdir("a")
      jupyter = a.join("jupyter")
      jupyter.write("from jupyter_core import command; command.main()")
      jupyter.chmod(0o700)
      witness = a.join("jupyter-witness")
      witness_src = "#!{}\n{}\n".format(
          sys.executable, 'print("WITNESS ME")'
      )
      write_executable(witness, witness_src)
  
      env = {"PATH": ""}
      if (
          "SYSTEMROOT" in os.environ
      ):  # Windows http://bugs.python.org/issue20614
          env["SYSTEMROOT"] = os.environ["SYSTEMROOT"]
      if sys.platform == "win32":
          env["PATHEXT"] = ".EXE"
      # This won't work on windows unless
      out = check_output(
          [sys.executable, str(jupyter), "witness"], env=env
      )
      assert b"WITNESS" in out
  
imports: from __future__ import annotations
  import json
  import os
  import sys
  import sysconfig
  from subprocess import PIPE, CalledProcessError, check_output
  from unittest.mock import patch
  import pytest
  from jupyter_core import __version__
  from jupyter_core.command import list_subcommands
  from jupyter_core.paths import jupyter_config_dir, jupyter_config_path, jupyter_data_dir, jupyter_path, jupyter_runtime_dir
label_desc: Use image node_id 16 for calling a global function with example usage: test_not_on_path(tmpdir) without return types