code: def on_step_end(self, iteration, trials, **info):
      num_running = len(
          [t for t in trials if t.status == Trial.RUNNING]
      )
  
      # All 3 trials (3 different learning rates) should be scheduled.
      assert 3 == min(3, len(trials))
      # Cannot run more than 2 at a time
      # (due to different resource restrictions in the test cases).
      assert num_running <= 2
  
file_path: ray/rllib/tests/test_placement_groups.py
imports: import os
  import unittest
  import ray
  from ray import air
  from ray import tune
  from ray.tune import Callback
  from ray.rllib.algorithms.ppo import PPO, PPOConfig
  from ray.tune.experiment import Trial
  from ray.tune.execution.placement_groups import PlacementGroupFactory
label_desc: Use image node_id 1 for calling the _TestCallback obj's underlying member method code with example usage: obj.on_step_end(iteration, trials) without return types