code: def ray_shutdown():
      yield
      # The code after the yield will run as teardown code.
      ray.shutdown()
  
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 for calling a global function with example usage: ray_shutdown() without return types