def _get_proc_name(proc):
 try:
  return (proc.name() if PSUTIL2 else proc.name)
 except (psutil.NoSuchProcess, psutil.AccessDenied):
  return []

def _get_proc_name ( proc ) : try : return ( proc . name ( ) if PSUTIL2 else proc . name ) except ( psutil . NoSuchProcess , psutil . AccessDenied ) : return [ ]
returns the name of a process instance .