code: def test_heartbeat_ip(shutdown_only):
      cluster = ray.init(num_cpus=1)
      global_state_accessor = make_global_state_accessor(cluster)
      self_ip = ray.util.get_node_ip_address()
  
      def self_ip_is_set():
          message = global_state_accessor.get_all_resource_usage()
          if message is None:
              return False
  
          resource_usage = gcs_utils.ResourceUsageBatchData.FromString(
              message
          )
          resources_data = resource_usage.batch[0]
          return resources_data.node_manager_address == self_ip
  
      wait_for_condition(self_ip_is_set, timeout=2)
      global_state_accessor.disconnect()
  
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 14 for calling a global function with example usage: test_heartbeat_ip(shutdown_only) and returns: unknown, False