code: def __init__(self, schedule, wait_for_previous_set=True):
      self._schedule = schedule
      self._generator = self.host_generator()
      self.executor = None
      # The previous set of hosts
      # We need a reference to them as iterators only can provide the next set
      self.prevlist = None
      self.wait_for_previous_set = wait_for_previous_set
  
imports: from contextlib import contextmanager
  import psutil
  import os
  import socket
  import time
  import mock
  import pytest
  import ray
  from horovod.common.util import gloo_built
  from horovod.runner.elastic.discovery import HostDiscovery
  from horovod.ray.elastic import ElasticRayExecutor, RayHostDiscovery
label_desc: Use image node_id 1 to create a new SimpleTestDiscovery object from inherited base classes: HostDiscovery with example: obj = SimpleTestDiscovery(schedule, wait_for_previous_set)