code: def test_location_pending(ray_start_cluster):
      cluster = ray_start_cluster
      cluster.add_node(num_cpus=1, object_store_memory=75 * 1024 * 1024)
      ray.init(cluster.address)
      cluster.wait_for_nodes()
  
      @ray.remote
      def task():
          # sleep for 1 hour so the object will be pending
          time.sleep(3600)
          return 1
  
      object_ref = task.remote()
      locations = ray.experimental.get_object_locations([object_ref])
      location = locations[object_ref]
      assert location["node_ids"] == []
      # TODO(chenshen): this is a result of converting int -1 to unsigned int;
      # should be fix by https://github.com/ray-project/ray/issues/16321
      assert location["object_size"] == 2**64 - 1
  
file_path: ray/python/ray/tests/test_get_locations.py
imports: import time
  import numpy
  import pytest
  import ray
label_desc: Use image node_id 8 for calling a global function with example usage: test_location_pending(ray_start_cluster) and returns: int