class_docstr: Managing autoscaling policies and the lifecycle of the scaling function calls.
class_docstr_tok: ["Managing","autoscaling","policies","and","the","lifecycle","of","the","scaling","function","calls","."]
docstr: Creates an autoscaling policy based on the given config.
docstr_tok: ["Creates","an","autoscaling","policy","based","on","the","given","config","."]
code: def _create_policy(self):
      """Creates an autoscaling policy based on the given config."""
      if self.config:
          self.policy = self.config.get_policy()
  
file_path: ray/python/ray/serve/_private/autoscaling_policy.py
imports: import logging
  from typing import List, Optional
  from ray.serve._private.common import TargetCapacityDirection
  from ray.serve._private.constants import SERVE_LOGGER_NAME
  from ray.serve._private.utils import get_capacity_adjusted_num_replicas
  from ray.serve.config import AutoscalingConfig
label_desc: Use image node_id 2 for calling the AutoscalingPolicyManager obj's underlying member method code with example usage: obj._create_policy() without return types