code: def test_failed_run(self):
      def fn():
          hvd.init()
          rank = hvd.rank()
          if rank == 1:
              raise RuntimeError()
          # The other worker waits a while before exiting.
          time.sleep(120)
  
      assert gloo_built() or mpi_built()
  
      start = time.time()
  
      if gloo_built():
          with pytest.raises(
              RuntimeError,
              match="Horovod detected that one or more processes exited",
          ):
              run(fn, np=2, use_gloo=True)
  
      if mpi_built():
          with pytest.raises(RuntimeError, match="mpirun failed"):
              run(fn, np=2, use_mpi=True)
  
      # The controller should be terminating workers way before the 2-minute delay.
      assert time.time() - start < 60
  
file_path: horovod/test/integration/test_interactiverun.py
imports: import time
  import sys
  import unittest
  import warnings
  import pytest
  import torch
  import horovod.torch
  from horovod.common.util import gloo_built, mpi_built
  from horovod.runner import run, _HorovodArgs
  from horovod.runner.launch import _run
label_desc: Use image node_id 4 for calling the InteractiveRunTests obj's underlying member method code with example usage: obj.test_failed_run() without return types