code: def try_and_handle(cmd, dry_run=False):
      if dry_run:
          print(f"Executing command: {cmd}")
      else:
          try:
              subprocess.run([cmd], shell=True, check=True)
          except subprocess.CalledProcessError as e:
              raise (e)
  
file_path: serve/ts_scripts/utils.py
imports: import os
  import platform
  import subprocess
  import sys
label_desc: Use image node_id 6 for calling a global function with example usage: try_and_handle(cmd, dry_run) without return types