code: def main(results=None):
      results = results or []
  
      ray_config = {"logging_level": logging.WARNING}
  
      def ray_connect_handler(job_config=None, **ray_init_kwargs):
          from ray._private.client_mode_hook import disable_client_hook
  
          with disable_client_hook():
              import ray as real_ray
  
              if not real_ray.is_initialized():
                  real_ray.init(**ray_config)
  
      for name, obj in inspect.getmembers(sys.modules[__name__]):
          if not name.startswith("benchmark_"):
              continue
          with ray_start_client_server(
              ray_connect_handler=ray_connect_handler
          ) as ray:
              obj(ray, results)
  
      return results
  
file_path: ray/python/ray/_private/ray_client_microbenchmark.py
imports: import inspect
  import logging
  import numpy
  import sys
  from ray.util.client.ray_client_helpers import ray_start_client_server
  from ray._private.ray_microbenchmark_helpers import timeit
label_desc: Use image node_id 7 for calling a global function with example usage: main(results) and returns: results