class_docstr: SubprocGroup provides a context manager to coordinate opening and closing of many Subprocs.
code: def join_all(self) -> None:
      # Every process should be joinable within one second.
      errors = [subproc.join_and_check() for subproc in self]
  
      # Terminate any processes which did not exit in time.
      num_unterminated = 0
      for subproc in self:
          if subproc.is_alive():
              subproc.terminate()
              subproc.join()
              num_unterminated += 1
      assert num_unterminated == 0
  
      # Make sure none of the processes raised an error.
      errors = [e for e in errors if e is not None]
      if len(errors):
          print("Traceback from child process:", file=sys.stderr)
          print(textwrap.indent(errors[0], "|"), file=sys.stderr)
          raise AssertionError("failure in child process")
  
imports: import abc
  import itertools
  import multiprocessing
  import sys
  import textwrap
  import time
  import traceback
  from typing import Any, List, Optional, cast
  import pytest
  import determined
  from determined import core, ipc
  from tests import parallel
label_desc: Use image node_id 1 for calling the SubprocGroup obj's underlying member method code with example usage: obj.join_all() without return types