code: def test_zero_default_proto():
      # Test that options set to zero (protobuf default value) still retain their
      # original value after being serialized and deserialized.
      config = DeploymentConfig(
          autoscaling_config={
              "min_replicas": 1,
              "max_replicas": 2,
              "smoothing_factor": 0.123,
              "downscale_delay_s": 0,
          }
      )
      serialized_config = config.to_proto_bytes()
      deserialized_config = DeploymentConfig.from_proto_bytes(
          serialized_config
      )
      new_delay_s = (
          deserialized_config.autoscaling_config.downscale_delay_s
      )
      assert new_delay_s == 0
  
      # Check that this test is not spuriously passing.
      default_downscale_delay_s = AutoscalingConfig().downscale_delay_s
      assert new_delay_s != default_downscale_delay_s
  
imports: import pytest
  from ray import cloudpickle
  from ray._private.pydantic_compat import ValidationError
  from ray._private.utils import import_attr
  from ray.serve._private.config import DeploymentConfig, ReplicaConfig, _proto_to_dict
  from ray.serve._private.constants import DEFAULT_AUTOSCALING_POLICY, DEFAULT_GRPC_PORT
  from ray.serve._private.utils import DEFAULT
  from ray.serve.autoscaling_policy import default_autoscaling_policy
  from ray.serve.config import AutoscalingConfig, DeploymentMode, HTTPOptions, ProxyLocation, gRPCOptions
  from ray.serve.generated.serve_pb2 import AutoscalingConfig
  from ray.serve.generated.serve_pb2 import DeploymentConfig
  from ray.serve.generated.serve_pb2 import DeploymentLanguage
  from ray.serve.generated.serve_pb2_grpc import add_UserDefinedServiceServicer_to_server
  from ray.serve.schema import DeploymentSchema, HTTPOptionsSchema, ServeApplicationSchema, ServeDeploySchema
label_desc: Use image node_id 6 for calling a global function with example usage: test_zero_default_proto() without return types