code: def _restart(args):
      _stop(args)
      time.sleep(1)
  
      pid_path = _get_pid_path(args.pid)
      process = _get_atm_process(pid_path)
  
      if process:
          print("ATM did not stop correctly. Aborting")
      else:
          _start(args)
  
imports: import argparse
  import logging
  import multiprocessing
  import os
  import time
  import psutil
  from daemon import DaemonContext
  from lockfile.pidlockfile import PIDLockFile
  from atm.api import create_app
  from atm.config import AWSConfig, DatasetConfig, LogConfig, RunConfig, SQLConfig
  from atm.core import ATM
  from atm.data import copy_files, download_demo, get_demos
label_desc: Use image node_id 10 for calling a global function with example usage: _restart(args) without return types