code: def test_autoscaler_set_node_labels(shutdown_only):
      cluster = AutoscalingCluster(
          head_resources={"CPU": 0},
          worker_node_types={
              "worker_1": {
                  "resources": {"CPU": 1},
                  "labels": {"region": "us"},
                  "node_config": {},
                  "min_workers": 1,
                  "max_workers": 1,
              }
          },
      )
  
      try:
          cluster.start()
          ray.init()
          wait_for_condition(lambda: len(ray.nodes()) == 2)
  
          for node in ray.nodes():
              if node["Resources"].get("CPU", 0) == 1:
                  assert node["Labels"] == add_default_labels(
                      node, {"region": "us"}
                  )
      finally:
          cluster.shutdown()
  
file_path: ray/python/ray/tests/test_node_labels.py
imports: import os
  import sys
  import pytest
  import subprocess
  import ray
  from ray.cluster_utils import AutoscalingCluster
  from ray._private.test_utils import wait_for_condition
label_desc: Use image node_id 9 for calling a global function with example usage: test_autoscaler_set_node_labels(shutdown_only) without return types