code: def _linkerd_install_cmd(
      self, kind_cluster: KindCluster, cmd, tool_name: str
  ) -> None:
      self._log.info(f"Installing {tool_name} to Cluster...")
      kube_out = subprocess.check_output(
          (str(kind_cluster.kubectl_path), "version"),
          env=os.environ,
      )
      self._log.info(f"kuberbetes versions: {kube_out}")
  
      # since we need to pipe to commands and the linkerd output can bee too long
      # there is a risk of deadlock and hanging tests: https://docs.python.org/3/library/subprocess.html#popen-objects
      # to avoid this, the right mechanism is implemented in subprocess.run and subprocess.check_output, but output
      # must be piped to a file-like object, not to stdout
      proc_stdout = tempfile.TemporaryFile()
      proc = subprocess.run(
          cmd,
          stdout=proc_stdout,
          env={"KUBECONFIG": str(kind_cluster.kubeconfig_path)},
      )
  
      proc_stdout.seek(0)
      kube_out = subprocess.check_output(
          (
              str(kind_cluster.kubectl_path),
              "apply",
              "-f",
              "-",
          ),
          stdin=proc_stdout,
          env=os.environ,
      )
  
      returncode = proc.returncode
      self._log.info(
          f"Installing {tool_name} to Cluster returned code {returncode}, kubectl output was {kube_out}"
      )
      if returncode is not None and returncode != 0:
          raise Exception(
              f"Installing {tool_name} failed with {returncode}"
          )
  
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 2 for calling the KindClusterWrapper obj's underlying member method code with example usage: obj._linkerd_install_cmd(kind_cluster, cmd, tool_name) without return types