code: def test_get_actor_race_condition(shutdown_only):
      @ray.remote
      class Actor:
          def ping(self):
              return "ok"
  
      @ray.remote
      def getter(name):
          try:
              try:
                  actor = ray.get_actor(name)
              except Exception:
                  print("Get failed, trying to create", name)
                  actor = Actor.options(
                      name=name, lifetime="detached"
                  ).remote()
          except Exception:
              print("Someone else created it, trying to get")
              actor = ray.get_actor(name)
          result = ray.get(actor.ping.remote())
          return result
  
      def do_run(name, concurrency=4):
          name = "actor_" + str(name)
          tasks = [getter.remote(name) for _ in range(concurrency)]
          result = ray.get(tasks)
          ray.kill(ray.get_actor(name))  # Cleanup
          return result
  
      for i in range(50):
          CONCURRENCY = 8
          results = do_run(i, concurrency=CONCURRENCY)
          assert ["ok"] * CONCURRENCY == results
  
imports: import os
  import sys
  import time
  import numpy
  import pytest
  import ray
  import ray._private.gcs_utils
  from ray.util.state import list_actors
  import ray.cluster_utils
  from ray._private.test_utils import SignalActor, convert_actor_state, kill_actor_and_wait_for_failure, make_global_state_accessor, run_string_as_driver, wait_for_condition, wait_for_pid_to_exit
  from ray._private.ray_constants import gcs_actor_scheduling_enabled
  from ray.experimental.internal_kv import _internal_kv_get, _internal_kv_put
label_desc: Use image node_id 34 for calling a global function with example usage: test_get_actor_race_condition(shutdown_only) and returns: result, result, str