code: def test_gpu_discovery(self, ray_shutdown):
      ray.init(num_cpus=4, num_gpus=1)
      discovery = RayHostDiscovery(use_gpu=True, cpus_per_worker=1)
      mapping = discovery.find_available_hosts_and_slots()
      assert len(mapping) == 1
      assert list(mapping.values()) == [1]
  
imports: from contextlib import contextmanager
  import psutil
  import os
  import socket
  import mock
  import pytest
  import ray
  from horovod.common.util import gloo_built
  from horovod.runner.elastic.discovery import HostDiscovery
  from horovod.ray.elastic_v2 import RayHostDiscovery
  from horovod.ray.runner import RayExecutor
label_desc: Use image node_id 2 for calling the TestRayDiscoverySuite obj's underlying member method code with example usage: obj.test_gpu_discovery(ray_shutdown) without return types