code: def test_update_deployment_api_server_hpa_conf(
      mock_update_deployment: MagicMock,
      mock_get: MagicMock,
      update_schema: UpdateDeploymentSchema,
      get_schema: DeploymentSchema,
      cloudclient: BentoCloudClient,
  ):
      mock_update_deployment.side_effect = f_update
      mock_get.return_value = get_schema
      api_server = Resource.for_api_server(hpa_conf={"min_replicas": 9})
      hpa_conf = Resource.for_hpa_conf(min_replicas=8)
      res = cloudclient.deployment.update(
          deployment_name="test-xxx",
          cluster_name="",
          kube_namespace="",
          api_server_config=api_server,
          hpa_conf=hpa_conf,
      )
      UpdateDeploymentSchema(
          targets=[
              CreateDeploymentTargetSchema(
                  type=DeploymentTargetType.STABLE,
                  bento_repository="iris_classifier",
                  bento="12345",
                  config=DeploymentTargetConfig(
                      resource_instance="t3-micro",
                      enable_ingress=True,
                      hpa_conf=DeploymentTargetHPAConf(
                          min_replicas=2, max_replicas=10
                      ),
                      runners={
                          "runner1": DeploymentTargetRunnerConfig(
                              resource_instance="t3-small",
                              hpa_conf=DeploymentTargetHPAConf(
                                  min_replicas=3, max_replicas=10
                              ),
                          ),
                          "runner2": DeploymentTargetRunnerConfig(
                              resource_instance="t3-medium",
                              hpa_conf=DeploymentTargetHPAConf(
                                  min_replicas=5, max_replicas=10
                              ),
                          ),
                      },
                  ),
              )
          ],
          mode=DeploymentMode.Function,
          labels=[],
      )
      update_schema.targets[0].config.hpa_conf.min_replicas = 9
      for _, v in update_schema.targets[0].config.runners.items():
          v.hpa_conf.min_replicas = 8
      assert res == update_schema
  
imports: from __future__ import annotations
  import typing
  from datetime import datetime
  from unittest.mock import patch
  import attr
  import pytest
  from bentoml._internal.cloud.schemas import BentoFullSchema
  from bentoml._internal.cloud.schemas import BentoImageBuildStatus
  from bentoml._internal.cloud.schemas import BentoManifestSchema
  from bentoml._internal.cloud.schemas import BentoRepositorySchema
  from bentoml._internal.cloud.schemas import BentoUploadStatus
  from bentoml._internal.cloud.schemas import ClusterSchema
  from bentoml._internal.cloud.schemas import CreateDeploymentSchema
  from bentoml._internal.cloud.schemas import CreateDeploymentTargetSchema
  from bentoml._internal.cloud.schemas import DeploymentMode
  from bentoml._internal.cloud.schemas import DeploymentRevisionSchema
  from bentoml._internal.cloud.schemas import DeploymentRevisionStatus
  from bentoml._internal.cloud.schemas import DeploymentSchema
  from bentoml._internal.cloud.schemas import DeploymentStatus
  from bentoml._internal.cloud.schemas import DeploymentTargetCanaryRule
  from bentoml._internal.cloud.schemas import DeploymentTargetCanaryRuleType
  from bentoml._internal.cloud.schemas import DeploymentTargetConfig
  from bentoml._internal.cloud.schemas import DeploymentTargetHPAConf
  from bentoml._internal.cloud.schemas import DeploymentTargetRunnerConfig
  from bentoml._internal.cloud.schemas import DeploymentTargetSchema
  from bentoml._internal.cloud.schemas import DeploymentTargetType
  from bentoml._internal.cloud.schemas import LabelItemSchema
  from bentoml._internal.cloud.schemas import ResourceType
  from bentoml._internal.cloud.schemas import UpdateDeploymentSchema
  from bentoml._internal.cloud.schemas import UserSchema
  from bentoml.cloud import BentoCloudClient
  from bentoml.cloud import Resource
label_desc: Use image node_id 23 for calling a global function with example usage: test_update_deployment_api_server_hpa_conf(mock_update_deployment, mock_get, update_schema, get_schema, cloudclient) without return types