code: def create_autoscaling_controlled_app(
      config: AutoscalingControllerAppConfig,
  ) -> Application:
      min_replicas = config.min_replicas
      initial_replicas = config.initial_replicas
      max_replicas = config.max_replicas
      return ControlledLifecycleDeployment.options(
          name="controlled",
          autoscaling_config=AutoscalingConfig(
              min_replicas=min_replicas,
              initial_replicas=initial_replicas,
              max_replicas=max_replicas,
              target_num_ongoing_requests_per_replica=1,
              metrics_interval_s=0.01,
              look_back_period_s=0.01,
              upscale_delay_s=0.01,
              downscale_delay_s=0.01,
          ),
          graceful_shutdown_timeout_s=0,
      ).bind()
  
imports: import asyncio
  import sys
  from copy import deepcopy
  from typing import Dict, Optional
  import pytest
  import ray
  from ray import serve
  from ray._private.pydantic_compat import BaseModel
  from ray._private.test_utils import SignalActor, wait_for_condition
  from ray.exceptions import RayActorError
  from ray.serve import Application
  from ray.serve._private.client import ServeControllerClient
  from ray.serve._private.common import ApplicationStatus, DeploymentStatus, DeploymentStatusTrigger, ReplicaState, TargetCapacityDirection
  from ray.serve._private.constants import SERVE_DEFAULT_APP_NAME, SERVE_NAMESPACE
  from ray.serve.config import AutoscalingConfig
  from ray.serve.context import _get_global_client
  from ray.serve.schema import ServeApplicationSchema, ServeDeploySchema
label_desc: Use image node_id 9 for calling a global function with example usage: create_autoscaling_controlled_app(config) and returns: ControlledLifecycleDeployment