def _get_proc_status(proc):
 try:
  return (proc.status() if PSUTIL2 else proc.status)
 except (psutil.NoSuchProcess, psutil.AccessDenied):
  return None

def _get_proc_status ( proc ) : try : return ( proc . status ( ) if PSUTIL2 else proc . status ) except ( psutil . NoSuchProcess , psutil . AccessDenied ) : return None
returns the status of a process instance .