code: def test_deploy_accelerator_type(
      production_variant,
      create_sagemaker_model,
      name_from_base,
      sagemaker_session,
  ):
      model = Model(
          MODEL_IMAGE,
          MODEL_DATA,
          role=ROLE,
          name=MODEL_NAME,
          sagemaker_session=sagemaker_session,
      )
  
      production_variant_result = copy.deepcopy(BASE_PRODUCTION_VARIANT)
      production_variant_result["AcceleratorType"] = ACCELERATOR_TYPE
      production_variant.return_value = production_variant_result
  
      model.deploy(
          instance_type=INSTANCE_TYPE,
          initial_instance_count=INSTANCE_COUNT,
          accelerator_type=ACCELERATOR_TYPE,
      )
  
      create_sagemaker_model.assert_called_with(
          instance_type=INSTANCE_TYPE,
          accelerator_type=ACCELERATOR_TYPE,
          tags=None,
          serverless_inference_config=None,
      )
      production_variant.assert_called_with(
          MODEL_NAME,
          INSTANCE_TYPE,
          INSTANCE_COUNT,
          accelerator_type=ACCELERATOR_TYPE,
          serverless_inference_config=None,
          volume_size=None,
          model_data_download_timeout=None,
          container_startup_health_check_timeout=None,
      )
  
      sagemaker_session.endpoint_from_production_variants.assert_called_with(
          name=ENDPOINT_NAME,
          production_variants=[production_variant_result],
          tags=None,
          kms_key=None,
          wait=True,
          explainer_config_dict=None,
          data_capture_config_dict=None,
          async_inference_config_dict=None,
          live_logging=False,
      )
  
imports: from __future__ import absolute_import
  import copy
  import pytest
  from mock import Mock, patch
  import sagemaker
  from sagemaker.model import Model, ModelPackage
  from sagemaker.async_inference import AsyncInferenceConfig
  from sagemaker.serverless import ServerlessInferenceConfig
  from sagemaker.explainer import ExplainerConfig
  from sagemaker.compute_resource_requirements.resource_requirements import ResourceRequirements
  from tests.unit.sagemaker.inference_recommender.constants import DESCRIBE_COMPILATION_JOB_RESPONSE, DESCRIBE_MODEL_PACKAGE_RESPONSE, DESCRIBE_MODEL_RESPONSE, MODEL_RECOMMENDATION_ENV, MODEL_RECOMMENDATION_ID, INVALID_RECOMMENDATION_ID, IR_COMPILATION_JOB_NAME, IR_ENV, IR_IMAGE, IR_MODEL_DATA, IR_MODEL_NAME, IR_MODEL_PACKAGE_VERSION_ARN, IR_COMPILATION_IMAGE, IR_COMPILATION_MODEL_DATA, NOT_EXISTED_MODEL_RECOMMENDATION_ID, RECOMMENDATION_ID, NOT_EXISTED_RECOMMENDATION_ID, IR_CONTAINER_DEF, DEPLOYMENT_RECOMMENDATION_CONTAINER_DEF, IR_COMPILATION_CONTAINER_DEF, IR_MODEL_PACKAGE_CONTAINER_DEF, IR_COMPILATION_MODEL_PACKAGE_CONTAINER_DEF
  from tests.unit.sagemaker.inference_recommender.constructs import create_inference_recommendations_job_default_with_model_name, create_inference_recommendations_job_default_with_model_name_and_compilation, create_inference_recommendations_job_default_with_model_package_arn, create_inference_recommendations_job_default_with_model_package_arn_and_compilation
label_desc: Use image node_id 3 for calling a global function with example usage: test_deploy_accelerator_type(production_variant, create_sagemaker_model, name_from_base, sagemaker_session) without return types