code: def _install_kernel(name="signaltest", extra_env=None):
      if extra_env is None:
          extra_env = {}
      kernel_dir = pjoin(paths.jupyter_data_dir(), "kernels", name)
      os.makedirs(kernel_dir, exist_ok=True)
      with open(pjoin(kernel_dir, "kernel.json"), "w") as f:
          f.write(
              json.dumps(
                  {
                      "argv": [
                          sys.executable,
                          "-m",
                          "tests.signalkernel",
                          "-f",
                          "{connection_file}",
                      ],
                      "display_name": "Signal Test Kernel",
                      "env": {
                          "TEST_VARS": "${TEST_VARS}:test_var_2",
                          **extra_env,
                      },
                  }
              )
          )
  
imports: import asyncio
  import concurrent.futures
  import json
  import os
  import signal
  import sys
  import time
  from subprocess import PIPE
  import pytest
  from jupyter_core import paths
  from traitlets.config.loader import Config
  from jupyter_client import AsyncKernelManager, KernelManager
  from jupyter_client.manager import _ShutdownStatus, start_new_async_kernel, start_new_kernel
  from .utils import AsyncKMSubclass, SyncKMSubclass
label_desc: Use image node_id 3 for calling a global function with example usage: _install_kernel(name, extra_env) without return types