code: def setup_anyscale_cluster():
      """Setup ray cluster at anyscale via ray.client()
  
      Note this is by default large scale and should be kicked off
      less frequently.
      """
      # TODO: Ray client didn't work with releaser script yet because
      # we cannot connect to anyscale cluster from its headnode
      # ray.client().env({}).connect()
      ray.init(
          address="auto",
          # This flag can be enabled to debug node autoscaler events.
          # But the cluster scaling has been stable for now, so we turn it off
          # to reduce spam.
          runtime_env={"env_vars": {"SERVE_ENABLE_SCALING_LOG": "0"}},
      )
      serve.start(proxy_location=DeploymentMode.EveryNode)
  
      # Print memory usage on the head node to help diagnose/debug memory leaks.
      monitor_memory_usage()
  
      return _get_global_client()
  
file_path: ray/release/serve_tests/workloads/serve_test_cluster_utils.py
imports: import logging
  import ray
  import requests
  from ray._private.test_utils import monitor_memory_usage
  from ray.cluster_utils import Cluster
  from ray import serve
  from ray.serve.config import DeploymentMode
  from ray.serve.context import _get_global_client
label_desc: Use image node_id 2 for calling a global function with example usage: setup_anyscale_cluster() and returns: _get_global_client