code: def _get_atm_process(pid_path):
      """Return ``psutil.Process`` of the ``pid`` file. Release the pidfile if stale."""
      pid_file = PIDLockFile(pid_path, timeout=1.0)
  
      if pid_file.is_locked():
          pid = pid_file.read_pid()
  
          try:
              process = psutil.Process(pid)
              if process.name() == "atm":
                  return process
              else:
                  pid_file.break_lock()
  
          except psutil.NoSuchProcess:
              pid_file.break_lock()
  
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 5 for calling a global function with example usage: _get_atm_process(pid_path) and returns: process