code: def install_kernel(
      kernels_dir, argv=None, name="test", display_name=None
  ):
      """install a kernel in a kernels directory"""
      kernel_dir = pjoin(kernels_dir, name)
      os.makedirs(kernel_dir)
      kernel_json = {
          "argv": argv or sample_kernel_json["argv"],
          "display_name": display_name
          or sample_kernel_json["display_name"],
      }
      json_file = pjoin(kernel_dir, "kernel.json")
      with open(json_file, "w") as f:
          json.dump(kernel_json, f)
      return kernel_dir
  
imports: import json
  import os
  import sys
  from typing import Dict
  import pytest
  from jupyter_client import AsyncKernelManager, AsyncMultiKernelManager, KernelManager, MultiKernelManager
label_desc: Use image node_id 1 for calling a global function with example usage: install_kernel(kernels_dir, argv, name, display_name) and returns: kernel_dir