code: def _is_pid_running(pid):
      import os
      import errno
  
      try:
          os.kill(pid, 0)
      except OSError as err:
          if err.errno == errno.ESRCH:
              return False
          elif err.errno == errno.EPERM:
              return True
          else:
              raise
      else:
          return True
  
file_path: labml/client/labml/internal/computer/monitoring_process.py
imports: import os
  import threading
  import time
  from labml import monit
  from labml.internal.computer import monitor
  from labml.internal.computer.configs import computer_singleton
  from labml.internal.computer.projects.methods import call_sync
  from labml.internal.computer.projects.polling import Polling
label_desc: Use image node_id 1 for calling a global function with example usage: _is_pid_running(pid) and returns: True, False, True