code: def main():
      ray.init(address="auto")
  
      bundles = [{"CPU": 1, "GPU": 1}]
      bundles += [{"CPU": 1} for _ in range(NUM_CPU_BUNDLES)]
  
      pg = placement_group(bundles, strategy="PACK")
  
      ray.get(pg.ready())
  
      workers = [
          Worker.options(
              scheduling_strategy=PlacementGroupSchedulingStrategy(
                  placement_group=pg
              )
          ).remote(i)
          for i in range(NUM_CPU_BUNDLES)
      ]
  
      trainer = Trainer.options(
          scheduling_strategy=PlacementGroupSchedulingStrategy(
              placement_group=pg
          )
      ).remote(0)
  
      start = time.time()
      while True:
          ray.get(
              [workers[i].work.remote() for i in range(NUM_CPU_BUNDLES)]
          )
          ray.get(trainer.train.remote())
          end = time.time()
          if end - start > RUNTIME:
              break
  
      if "TEST_OUTPUT_JSON" in os.environ:
          out_file = open(os.environ["TEST_OUTPUT_JSON"], "w")
          results = {}
          json.dump(results, out_file)
  
file_path: ray/release/nightly_tests/placement_group_tests/pg_run.py
imports: import os
  import time
  import json
  import ray
  from ray.util.placement_group import placement_group
  from ray.util.scheduling_strategies import PlacementGroupSchedulingStrategy
label_desc: Use image node_id 1 for calling a global function with example usage: main() without return types