code: def shell_portforward(
      kubectl_path,
      pod_or_service,
      port1,
      port2,
      namespace,
      waiting: float = 1,
  ):
      try:
          proc = subprocess.Popen(
              [
                  kubectl_path,
                  "port-forward",
                  pod_or_service,
                  f"{port1}:{port2}",
                  "--namespace",
                  namespace,
              ]
          )
          # Go and the port-forwarding needs some ms to be ready
          time.sleep(waiting)
  
          yield None
          time.sleep(waiting)
  
      except Exception as err:
          # Suppress extension exception
          raise OSError(err) from None
  
      finally:
          proc.kill()
  
imports: import contextlib
  import os
  import subprocess
  import tempfile
  import time
  from pathlib import Path
  from typing import Dict, List
  import docker
  import pytest
  from pytest import FixtureRequest
  from pytest_kind import KindCluster
  from jina.logging.logger import JinaLogger
label_desc: Use image node_id 9 for calling a global function with example usage: shell_portforward(kubectl_path, pod_or_service, port1, port2, namespace, waiting) without return types