code: def shell(cmd):
      try:
          logger.info("shell(): %s", cmd)
          output = subprocess.check_output(cmd)
      except subprocess.CalledProcessError as e:
          logger.info("subprocess raised: %s", e)
          if e.output:
              print(e.output)
          raise
      except Exception as e:
          logger.info("subprocess raised: %s", e)
          raise
      return output.decode("UTF-8").strip()
  
imports: import argparse
  import collections
  import hashlib
  import os
  import platform
  import re
  import shutil
  import stat
  import subprocess
  import sys
  import textwrap
  import urllib.request
  import logging
label_desc: Use image node_id 2 for calling a global function with example usage: shell(cmd) and returns: output