code: def test_happy_run_elastic_fault_tolerant_fails(self):
      self.skipTest(
          "elastic horovod does not support shutdown from the spark driver "
          "while elastic driver is waiting for hosts to come up"
      )
  
      if not gloo_built():
          self.skipTest("Gloo is not available")
  
      with spark_session(
          "test_happy_run_elastic_fault_tolerant_fails", max_failures=2
      ):
          with tempdir() as dir:
              # these files make training function fail in given rank, epoch and batch
              # we have as many failures as Spark has max_failures (per task / index)
              with open(
                  os.path.sep.join(
                      [dir, "rank_1_epoch_2_batch_4_fail"]
                  ),
                  "w",
              ), open(
                  os.path.sep.join(
                      [dir, "rank_1_epoch_3_batch_1_fail"]
                  ),
                  "w",
              ):
                  pass
              res = horovod.spark.run_elastic(
                  fn,
                  args=(2, 5, 5, dir),
                  env={"HOROVOD_LOG_LEVEL": "DEBUG"},
                  num_proc=2,
                  min_num_proc=2,
                  max_num_proc=2,
                  start_timeout=5,
                  verbose=2,
              )
              self.assertListEqual(
                  [
                      ([0, 4, 0, 4, 1, 4, 0, 4], 0),
                      ([0, 4, 0, 4, 1, 4, 0, 4], 1),
                  ],
                  res,
              )
  
imports: import logging
  import os
  import pytest
  import sys
  import unittest
  import warnings
  import mock
  import numpy
  import torch.nn
  import torch.optim
  from pyspark.ml.linalg import VectorUDT
  from pyspark.sql.types import FloatType, IntegerType
  from torch.nn import functional
  import horovod
  import horovod.spark.torch
  import horovod.torch
  import torch
  from horovod.common.util import gloo_built, mpi_built
  from horovod.runner.mpi_run import is_open_mpi
  from horovod.spark.common import constants, util
  from horovod.spark.torch import remote
  from horovod.spark.torch.estimator import EstimatorParams, _torch_param_serialize
  from horovod.torch.elastic import run
  from common import tempdir, spawn, is_built
  from spark_common import CallbackBackend, create_xor_data, create_xor_data_with_val, local_store, spark_session
label_desc: Use image node_id 18 for calling the SparkTorchTests obj's underlying member method code with example usage: obj.test_happy_run_elastic_fault_tolerant_fails() without return types