code: def run_cmd(cmd, **kwargs):
      if isinstance(cmd, str):
          cmd = cmd.split(" ")
  
      try:
          kwargs.update(stderr=subprocess.STDOUT)
          output = subprocess.check_output(cmd, **kwargs)
      except subprocess.CalledProcessError as e:
          # this avoids hiding the stdout / stderr of failed processes
          sio = io.StringIO()
          print("Command failed:", " ".join(cmd), file=sio)
          print("With output:", file=sio)
          print("--------------", file=sio)
          print(frombytes(e.output), file=sio)
          print("--------------", file=sio)
          raise RuntimeError(sio.getvalue())
  
      return frombytes(output)
  
imports: import contextlib
  import io
  import random
  import socket
  import subprocess
  import sys
  import threading
  import uuid
  import numpy
label_desc: Use image node_id 6 for calling a global function with example usage: run_cmd(cmd) and returns: frombytes