class_docstr: Integration tests for horovod.runner.
class_docstr_tok: ["Integration","tests","for","horovod.runner","."]
code: def test_run_failure(self, controller, mode, run):
      if controller == "gloo" and not gloo_built():
          self.skipTest("Gloo is not available")
      if controller == "mpi":
          if not (mpi_built() and mpi_available()):
              self.skipTest("MPI is not available")
  
      self.do_test_run_with_controller_failure(controller, mode, run)
  
imports: import contextlib
  import io
  import itertools
  import os
  import sys
  import warnings
  import mock
  from parameterized import parameterized
  import pytest
  import unittest
  from horovod.common.util import gloo_built, mpi_built
  from horovod.runner.common.util import safe_shell_exec
  from horovod.runner import _HorovodArgs
  from horovod.runner.launch import _check_all_hosts_ssh_successful, _run
  from horovod.runner.mpi_run import mpi_available
  from common import capture
label_desc: Use image node_id 4 for calling the StaticRunTests obj's underlying member method code with example usage: obj.test_run_failure(controller, mode, run) without return types