code: def test_delete_model_fail():
      sagemaker_session = empty_sagemaker_session()
      sagemaker_session.sagemaker_client.delete_model = Mock(
          side_effect=Exception("Could not find model.")
      )
      expected_error_message = (
          "One or more models cannot be deleted, please retry."
      )
  
      predictor = Predictor(
          ENDPOINT, sagemaker_session=sagemaker_session
      )
  
      with pytest.raises(Exception) as exception:
          predictor.delete_model()
          assert expected_error_message in str(exception.val)
  
imports: from __future__ import absolute_import
  import io
  import json
  import pytest
  from mock import Mock, call, patch
  from sagemaker.deserializers import CSVDeserializer, PandasDeserializer
  from sagemaker.enums import EndpointType
  from sagemaker.model_monitor.model_monitoring import DEFAULT_REPOSITORY_NAME
  from sagemaker.predictor import Predictor
  from sagemaker.serializers import JSONSerializer, CSVSerializer
  from sagemaker.compute_resource_requirements.resource_requirements import ResourceRequirements
label_desc: Use image node_id 19 for calling a global function with example usage: test_delete_model_fail() without return types