code: def _shutdown(args, log):
      log.info("RUN ACTIVITY TIMEOUT - SHUTTING DOWN SYSTEM")
      cmd = ["shutdown", f"+{args.grace_period}"]
      if args.su:
          cmd.insert(0, "sudo")
      log.debug("shutdown cmd: %r", cmd)
      if args.dont_shutdown:
          log.info("SHUTDOWN would occur but --dont-shutdown was used")
          return
      try:
          subprocess.check_call(cmd)
      except Exception:
          log.exception("shutdown")
  
file_path: guildai/guild/commands/shutdown_timer_impl.py
imports: import subprocess
  import time
  import psutil
  from .None import service_impl_support
label_desc: Use image node_id 11 for calling a global function with example usage: _shutdown(args, log) without return types