code: def test_from_compute(self):
      # Test that construction from ActorPoolStrategy works as expected.
      compute = ActorPoolStrategy(
          min_size=2, max_size=5, max_tasks_in_flight_per_actor=3
      )
      config = AutoscalingConfig.from_compute_strategy(compute)
      assert config.min_workers == 2
      assert config.max_workers == 5
      assert config.max_tasks_in_flight == 3
      assert config.ready_to_total_workers_ratio == 0.8
      assert config.idle_to_total_workers_ratio == 0.5
  
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 5 for calling the TestAutoscalingConfig obj's underlying member method code with example usage: obj.test_from_compute() without return types