docstr: Runs once over all child processes to check whether they are still running.
docstr_tok: ["Runs","once","over","all","child","processes","to","check","whether","they","are","still","running","."]
code: def _run(self) -> bool:
      """Runs once over all child processes to check whether they are still running."""
      for proc in self._child_processes:
          proc.poll()
  
      return_codes = [proc.returncode for proc in self._child_processes]
      if all(return_code == 0 for return_code in return_codes):
          return True
  
      for i, proc in enumerate(self._child_processes):
          if proc.returncode:
              message = rank_prefixed_message(
                  f"Child process with PID {proc.pid} terminated with code {proc.returncode}."
                  f" Forcefully terminating all other processes to avoid zombies 🧟",
                  rank=(i + 1),
              )
              _logger.info(message)
              self._terminate_all()
              return True
  
      return False
  
imports: import logging
  import os
  import signal
  import subprocess
  import sys
  import threading
  import time
  from typing import Any, Callable, List, Optional, Sequence, Tuple
  from lightning_utilities.core.imports import RequirementCache
  from typing_extensions import override
  from lightning.fabric.plugins.environments.cluster_environment import ClusterEnvironment
  from lightning.fabric.strategies.launchers.launcher import _Launcher
  from lightning.fabric.utilities.distributed import _set_num_threads_if_needed
  from lightning.fabric.utilities.rank_zero import rank_prefixed_message
label_desc: Use image node_id 3 for calling the _ChildProcessObserver obj's underlying member method code with example usage: obj._run() and returns: False, True, True