code: def run(cmd, **kwargs):
      """Echo a command before running it.  Defaults to repo as cwd"""
      log.info("> " + list2cmdline(cmd))
      kwargs.setdefault("cwd", HERE)
      kwargs.setdefault("shell", os.name == "nt")
      if not isinstance(cmd, (list, tuple)) and os.name != "nt":
          cmd = shlex.split(cmd)
      cmd_path = which(cmd[0])
      if not cmd_path:
          sys.exit(
              "Aborting. Could not find cmd (%s) in path. "
              "If command is not expected to be in user's path, "
              "use an absolute path." % cmd[0]
          )
      cmd[0] = cmd_path
      return subprocess.check_call(cmd, **kwargs)
  
imports: from collections import defaultdict
  from os.path import join
  import io
  import os
  import functools
  import pipes
  import re
  import shlex
  import subprocess
  import sys
  from setuptools import Command
  from setuptools.command.build_py import build_py
  from setuptools.command.sdist import sdist
  from distutils import log
  from setuptools.command.develop import develop
  from setuptools.command.bdist_egg import bdist_egg
label_desc: Use image node_id 7 for calling a global function with example usage: run(cmd) and returns: subprocess