code: def test_pull_bundles_admission_control(ray_start_cluster):
      cluster = ray_start_cluster
      object_size = int(6e6)
      num_objects = 10
      num_tasks = 10
      # Head node can fit all of the objects at once.
      cluster.add_node(
          num_cpus=0,
          object_store_memory=2 * num_tasks * num_objects * object_size,
      )
      cluster.wait_for_nodes()
      ray.init(address=cluster.address)
  
      # Worker node can only fit 1 task at a time.
      cluster.add_node(
          num_cpus=1,
          object_store_memory=1.5 * num_objects * object_size,
      )
      cluster.wait_for_nodes()
  
      @ray.remote
      def foo(*args):
          return
  
      args = []
      for _ in range(num_tasks):
          task_args = [
              ray.put(np.zeros(object_size, dtype=np.uint8))
              for _ in range(num_objects)
          ]
          args.append(task_args)
  
      tasks = [foo.remote(*task_args) for task_args in args]
      ray.get(tasks)
  
imports: import multiprocessing
  import time
  import warnings
  from collections import defaultdict
  import numpy
  import pytest
  import ray
  from ray.cluster_utils import Cluster, cluster_not_supported
  from ray.util.scheduling_strategies import NodeAffinitySchedulingStrategy
label_desc: Use image node_id 8 for calling a global function with example usage: test_pull_bundles_admission_control(ray_start_cluster) without return types