code: def get_deploy_kwargs(
      model_id: str,
      model_version: Optional[str] = None,
      region: Optional[str] = None,
      initial_instance_count: Optional[int] = None,
      instance_type: Optional[str] = None,
      serializer: Optional[BaseSerializer] = None,
      deserializer: Optional[BaseDeserializer] = None,
      accelerator_type: Optional[str] = None,
      endpoint_name: Optional[str] = None,
      tags: Optional[Tags] = None,
      kms_key: Optional[str] = None,
      wait: Optional[bool] = None,
      data_capture_config: Optional[DataCaptureConfig] = None,
      async_inference_config: Optional[AsyncInferenceConfig] = None,
      serverless_inference_config: Optional[
          ServerlessInferenceConfig
      ] = None,
      volume_size: Optional[int] = None,
      model_data_download_timeout: Optional[int] = None,
      container_startup_health_check_timeout: Optional[int] = None,
      inference_recommendation_id: Optional[str] = None,
      explainer_config: Optional[ExplainerConfig] = None,
      tolerate_vulnerable_model: Optional[bool] = None,
      tolerate_deprecated_model: Optional[bool] = None,
      sagemaker_session: Optional[Session] = None,
      accept_eula: Optional[bool] = None,
      endpoint_logging: Optional[bool] = None,
      resources: Optional[ResourceRequirements] = None,
      managed_instance_scaling: Optional[str] = None,
      endpoint_type: Optional[EndpointType] = None,
  ) -> JumpStartModelDeployKwargs:
      """Returns kwargs required to call `deploy` on `sagemaker.estimator.Model` object."""
  
      deploy_kwargs: JumpStartModelDeployKwargs = JumpStartModelDeployKwargs(
          model_id=model_id,
          model_version=model_version,
          region=region,
          initial_instance_count=initial_instance_count,
          instance_type=instance_type,
          serializer=serializer,
          deserializer=deserializer,
          accelerator_type=accelerator_type,
          endpoint_name=endpoint_name,
          tags=format_tags(tags),
          kms_key=kms_key,
          wait=wait,
          data_capture_config=data_capture_config,
          async_inference_config=async_inference_config,
          serverless_inference_config=serverless_inference_config,
          volume_size=volume_size,
          model_data_download_timeout=model_data_download_timeout,
          container_startup_health_check_timeout=container_startup_health_check_timeout,
          inference_recommendation_id=inference_recommendation_id,
          explainer_config=explainer_config,
          tolerate_deprecated_model=tolerate_deprecated_model,
          tolerate_vulnerable_model=tolerate_vulnerable_model,
          sagemaker_session=sagemaker_session,
          accept_eula=accept_eula,
          endpoint_logging=endpoint_logging,
          resources=resources,
      )
  
      deploy_kwargs = _add_sagemaker_session_to_kwargs(
          kwargs=deploy_kwargs
      )
  
      deploy_kwargs = _add_model_version_to_kwargs(kwargs=deploy_kwargs)
  
      deploy_kwargs = _add_endpoint_name_to_kwargs(kwargs=deploy_kwargs)
  
      deploy_kwargs = _add_instance_type_to_kwargs(kwargs=deploy_kwargs)
  
      deploy_kwargs.initial_instance_count = initial_instance_count or 1
  
      deploy_kwargs = _add_deploy_extra_kwargs(kwargs=deploy_kwargs)
  
      deploy_kwargs = _add_tags_to_kwargs(kwargs=deploy_kwargs)
  
      if endpoint_type == EndpointType.INFERENCE_COMPONENT_BASED:
          deploy_kwargs = _add_resources_to_kwargs(kwargs=deploy_kwargs)
          deploy_kwargs.endpoint_type = endpoint_type
          deploy_kwargs.managed_instance_scaling = (
              managed_instance_scaling
          )
  
      return deploy_kwargs
  
imports: from __future__ import absolute_import
  import json
  from typing import Any, Dict, List, Optional, Union
  from sagemaker import environment_variables, image_uris, instance_types, model_uris, script_uris
  from sagemaker.async_inference.async_inference_config import AsyncInferenceConfig
  from sagemaker.base_deserializers import BaseDeserializer
  from sagemaker.base_serializers import BaseSerializer
  from sagemaker.explainer.explainer_config import ExplainerConfig
  from sagemaker.jumpstart.artifacts import _model_supports_inference_script_uri, _retrieve_model_init_kwargs, _retrieve_model_deploy_kwargs, _retrieve_model_package_arn
  from sagemaker.jumpstart.artifacts.resource_names import _retrieve_resource_name_base
  from sagemaker.jumpstart.constants import DEFAULT_JUMPSTART_SAGEMAKER_SESSION, INFERENCE_ENTRY_POINT_SCRIPT_NAME, JUMPSTART_DEFAULT_REGION_NAME, JUMPSTART_LOGGER
  from sagemaker.model_metrics import ModelMetrics
  from sagemaker.metadata_properties import MetadataProperties
  from sagemaker.drift_check_baselines import DriftCheckBaselines
  from sagemaker.jumpstart.enums import JumpStartScriptScope
  from sagemaker.jumpstart.types import JumpStartModelDeployKwargs, JumpStartModelInitKwargs, JumpStartModelRegisterKwargs
  from sagemaker.jumpstart.utils import add_jumpstart_model_id_version_tags, update_dict_if_key_not_present, resolve_model_sagemaker_config_field, verify_model_region_and_return_specs
  from sagemaker.model_monitor.data_capture_config import DataCaptureConfig
  from sagemaker.base_predictor import Predictor
  from sagemaker import accept_types, content_types, serializers, deserializers
  from sagemaker.serverless.serverless_inference_config import ServerlessInferenceConfig
  from sagemaker.session import Session
  from sagemaker.utils import name_from_base, format_tags, Tags
  from sagemaker.workflow.entities import PipelineVariable
  from sagemaker.compute_resource_requirements.resource_requirements import ResourceRequirements
  from sagemaker import resource_requirements
  from sagemaker.enums import EndpointType
label_desc: Use image node_id 21 for calling a global function with example usage: get_deploy_kwargs(model_id, model_version, region, initial_instance_count, instance_type, serializer, deserializer, accelerator_type, endpoint_name, tags, kms_key, wait, data_capture_config, async_inference_config, serverless_inference_config, volume_size, model_data_download_timeout, container_startup_health_check_timeout, inference_recommendation_id, explainer_config, tolerate_vulnerable_model, tolerate_deprecated_model, sagemaker_session, accept_eula, endpoint_logging, resources, managed_instance_scaling, endpoint_type) and returns: deploy_kwargs