code: def test_right_size_default_with_model_name_successful(
      sagemaker_session, model
  ):
      inference_recommender_model = model.right_size(
          sample_payload_url=IR_SAMPLE_PAYLOAD_URL,
          supported_content_types=IR_SUPPORTED_CONTENT_TYPES,
          supported_instance_types=[IR_SAMPLE_INSTANCE_TYPE],
          job_name=IR_JOB_NAME,
          framework=IR_SAMPLE_FRAMEWORK,
      )
  
      sagemaker_session.create_model.assert_called_with(
          name=ANY,
          role=IR_ROLE_ARN,
          container_defs=None,
          primary_container=IR_SAMPLE_PRIMARY_CONTAINER,
          vpc_config=None,
          enable_network_isolation=False,
      )
  
      # assert that the create api has been called with default parameters with model name
      sagemaker_session.create_inference_recommendations_job.assert_called_with(
          role=IR_ROLE_ARN,
          job_name=IR_JOB_NAME,
          job_type="Default",
          job_duration_in_seconds=None,
          model_name=ANY,
          model_package_version_arn=None,
          framework=IR_SAMPLE_FRAMEWORK,
          framework_version=None,
          sample_payload_url=IR_SAMPLE_PAYLOAD_URL,
          supported_content_types=IR_SUPPORTED_CONTENT_TYPES,
          supported_instance_types=[IR_SAMPLE_INSTANCE_TYPE],
          endpoint_configurations=None,
          traffic_pattern=None,
          stopping_conditions=None,
          resource_limit=None,
      )
  
      sagemaker_session.wait_for_inference_recommendations_job.assert_called_with(
          IR_JOB_NAME, log_level="Verbose"
      )
  
      # confirm that the IR instance attributes have been set
      assert (
          inference_recommender_model.inference_recommender_job_results
          == IR_SAMPLE_INFERENCE_RESPONSE
      )
      assert (
          inference_recommender_model.inference_recommendations
          == IR_SAMPLE_INFERENCE_RESPONSE["InferenceRecommendations"]
      )
  
      # confirm that the returned object of right_size is itself
      assert inference_recommender_model == model
  
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 5 for calling a global function with example usage: test_right_size_default_with_model_name_successful(sagemaker_session, model) without return types