code: def test_node_name_cluster(ray_start_cluster):
      cluster = ray_start_cluster
      cluster.add_node(node_name="head_node", include_dashboard=False)
      head_context = ray.init(
          address=cluster.address, include_dashboard=False
      )
      cluster.add_node(node_name="worker_node", include_dashboard=False)
      cluster.wait_for_nodes()
  
      global_state_accessor = make_global_state_accessor(head_context)
      node_table = global_state_accessor.get_node_table()
      assert len(node_table) == 2
      for node in node_table:
          if node["NodeID"] == head_context.address_info["node_id"]:
              assert node["NodeName"] == "head_node"
          else:
              assert node["NodeName"] == "worker_node"
  
      global_state_accessor.disconnect()
      ray.shutdown()
      cluster.shutdown()
  
imports: import os
  import time
  import pytest
  import ray
  import ray._private.gcs_utils
  import ray._private.ray_constants
  from ray._raylet import GcsClient
  from ray.core.generated import autoscaler_pb2
  from ray._private.test_utils import convert_actor_state, make_global_state_accessor, wait_for_condition
label_desc: Use image node_id 7 for calling a global function with example usage: test_node_name_cluster(ray_start_cluster) without return types