code: def _get_npm(npm_install: str):
      npm_install = npm_install.strip()
      if npm_install == "npm install":
          npm = shutil.which("npm")
          if not npm:
              raise ValueError(
                  "By default, the install command uses npm to install "
                  "the frontend dependencies. Please install npm or pass your own install command "
                  "via the --npm-install option."
              )
          npm_install = f"{npm} install"
      return npm_install
  
file_path: gradio/gradio/cli/commands/components/install_component.py
imports: import shutil
  import subprocess
  from pathlib import Path
  from rich.markup import escape
  from typer import Argument, Option
  from typing_extensions import Annotated
  from gradio.cli.commands.display import LivePanelDisplay
  from gradio.utils import set_directory
label_desc: Use image node_id 1 for calling a global function with example usage: _get_npm(npm_install) and returns: npm_install