code: def test_deploy_no_role(sagemaker_session):
      model = Model(
          MODEL_IMAGE, MODEL_DATA, sagemaker_session=sagemaker_session
      )
  
      with pytest.raises(
          ValueError, match="Role can not be null for deploying a model"
      ):
          model.deploy(
              instance_type=INSTANCE_TYPE,
              initial_instance_count=INSTANCE_COUNT,
          )
  
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 18 for calling a global function with example usage: test_deploy_no_role(sagemaker_session) without return types