code: def test_pending_to_running(self, ray_start_regular_shared):
      # Test that pending actor is correctly transitioned to running.
      pool = _ActorPool()
      actor = self._add_ready_worker(pool)
      # Check that the actor is pickable.
      picked_actor = pool.pick_actor()
      assert picked_actor == actor
      # Check that the per-state pool sizes are as expected.
      assert pool.num_total_actors() == 1
      assert pool.num_pending_actors() == 0
      assert pool.num_running_actors() == 1
      assert pool.num_active_actors() == 1
      assert pool.num_idle_actors() == 0
      assert pool.num_free_slots() == 3
  
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 3 for calling the TestActorPool obj's underlying member method code with example usage: obj.test_pending_to_running(ray_start_regular_shared) without return types