code: def test_bounds_checking(self):
      num_replicas = 10
      max_replicas = 11
      min_replicas = 9
      config = AutoscalingConfig(
          max_replicas=max_replicas,
          min_replicas=min_replicas,
          target_num_ongoing_requests_per_replica=100,
      )
  
      desired_num_replicas = _calculate_desired_num_replicas(
          autoscaling_config=config,
          current_num_ongoing_requests=[150] * num_replicas,
      )
      assert desired_num_replicas == max_replicas
  
      desired_num_replicas = _calculate_desired_num_replicas(
          autoscaling_config=config,
          current_num_ongoing_requests=[50] * num_replicas,
      )
      assert desired_num_replicas == min_replicas
  
      for i in range(50, 150):
          desired_num_replicas = _calculate_desired_num_replicas(
              autoscaling_config=config,
              current_num_ongoing_requests=[i] * num_replicas,
          )
          assert min_replicas <= desired_num_replicas <= max_replicas
  
imports: import sys
  import numpy
  import pytest
  from ray.serve._private.autoscaling_policy import AutoscalingPolicyManager
  from ray.serve._private.constants import CONTROL_LOOP_PERIOD_S
  from ray.serve.autoscaling_policy import _calculate_desired_num_replicas
  from ray.serve.config import AutoscalingConfig
label_desc: Use image node_id 1 for calling the TestCalculateDesiredNumReplicas obj's underlying member method code with example usage: obj.test_bounds_checking() without return types