code: def test_chaos_defer(monkeypatch, ray_start_cluster):
      with monkeypatch.context() as m:
          # defer for 3s
          m.setenv(
              "RAY_testing_asio_delay_us",
              "NodeManagerService.grpc_client.PrepareBundleResources=2000000:2000000",
          )
          m.setenv("RAY_event_stats", "true")
          cluster = ray_start_cluster
          cluster.add_node(num_cpus=1, object_store_memory=1e9)
          cluster.wait_for_nodes()
          ray.init(address="auto")  # this will connect to gpu nodes
          cluster.add_node(num_cpus=0, num_gpus=1)
          bundle = [{"GPU": 1}, {"CPU": 1}]
          pg = placement_group(bundle)
          # PG will not be ready within 3s
          with pytest.raises(ray.exceptions.GetTimeoutError):
              ray.get(pg.ready(), timeout=1)
          # it'll be ready eventually
          ray.get(pg.ready())
  
imports: import sys
  import random
  import string
  import ray
  import pytest
  import time
  from ray.experimental import shuffle
  from ray.tests.conftest import _ray_start_chaos_cluster
  from ray.data._internal.progress_bar import ProgressBar
  from ray.util.placement_group import placement_group
  from ray._private.test_utils import NodeKillerActor, get_log_message, get_and_run_resource_killer, WorkerKillerActor, wait_for_condition
  from ray.exceptions import RayTaskError, ObjectLostError
  from ray.util.state.common import ListApiOptions, StateResource
  from ray.util.state.api import StateApiClient, list_nodes
  from ray.cluster_utils import AutoscalingCluster
label_desc: Use image node_id 5 for calling a global function with example usage: test_chaos_defer(monkeypatch, ray_start_cluster) without return types