code: def check_pid(pid):
      try:
          os.kill(pid, 0)
      except OSError as err:
          if err.errno == errno.ESRCH:
              return False
          elif err.errno == errno.EPERM:
              # Don't have permission to signal the process - probably means it exists
              return True
          raise
      else:
          return True
  
file_path: catboost/contrib/python/ipython/py3/IPython/utils/_process_posix.py
imports: import errno
  import os
  import subprocess
  import sys
  import pexpect
  from ._process_common import getoutput, arg_split
  from IPython.utils.encoding import DEFAULT_ENCODING
label_desc: Use image node_id 1 for calling a global function with example usage: check_pid(pid) and returns: True, False, True