code: def test_deploy_right_size_instance_type_override_fails(
      default_right_sized_model,
  ):
      with pytest.raises(
          ValueError,
          match="Must specify instance type and instance count unless using serverless inference",
      ):
          default_right_sized_model.deploy(
              instance_type="ml.c5.2xlarge",
              endpoint_name=IR_DEPLOY_ENDPOINT_NAME,
          )
  
imports: from __future__ import absolute_import
  from unittest.mock import patch, MagicMock, ANY
  from sagemaker.model import Model, ModelPackage
  from sagemaker.parameter import CategoricalParameter
  from sagemaker.inference_recommender.inference_recommender_mixin import Phase, ModelLatencyThreshold
  from sagemaker.async_inference import AsyncInferenceConfig
  from sagemaker.serverless import ServerlessInferenceConfig
  from sagemaker.explainer import ExplainerConfig
  import pytest
label_desc: Use image node_id 15 for calling a global function with example usage: test_deploy_right_size_instance_type_override_fails(default_right_sized_model) without return types