docstr: Terminates the main process and all its children.
docstr_tok: ["Terminates","the","main","process","and","all","its","children","."]
code: def _terminate_all(self) -> None:
      """Terminates the main process and all its children."""
      for p in self._child_processes:
          p.send_signal(self._termination_signal)
      os.kill(self._main_pid, self._termination_signal)
  
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 4 for calling the _ChildProcessObserver obj's underlying member method code with example usage: obj._terminate_all() without return types