code: def test_pick_ordering_with_returns(self, ray_start_regular_shared):
      # Test that pick ordering works with returns.
      pool = _ActorPool()
      actor1 = self._add_ready_worker(pool)
      actor2 = self._add_ready_worker(pool)
      picked_actors = [pool.pick_actor() for _ in range(2)]
      # Double-check that both actors were picked.
      assert set(picked_actors) == {actor1, actor2}
      # Return actor 2, implying that it's now idle.
      pool.return_actor(actor2)
      # Check that actor 2 is the next actor that's picked.
      assert pool.pick_actor() == actor2
  
imports: import collections
  import time
  import pytest
  import ray
  from ray.data._internal.compute import ActorPoolStrategy
  from ray.data._internal.execution.operators.actor_pool_map_operator import AutoscalingConfig, AutoscalingPolicy, _ActorPool
  from ray.data._internal.execution.util import make_ref_bundles
  from ray.tests.conftest import *
label_desc: Use image node_id 10 for calling the TestActorPool obj's underlying member method code with example usage: obj.test_pick_ordering_with_returns(ray_start_regular_shared) without return types