code: def test_model_prepare_container_def_no_instance_type_or_image():
      model = PyTorchModel(
          MODEL_DATA,
          role=ROLE,
          entry_point=SCRIPT_PATH,
          framework_version="1.3.1",
          py_version="py3",
      )
  
      with pytest.raises(ValueError) as e:
          model.prepare_container_def()
  
      expected_msg = "Must supply either an instance type (for choosing CPU vs GPU) or an image URI."
      assert expected_msg in str(e)
  
imports: from __future__ import absolute_import
  import logging
  import json
  import os
  import pytest
  from mock import ANY, MagicMock, Mock, patch
  from packaging.version import Version
  from sagemaker import image_uris
  from sagemaker.pytorch import defaults
  from sagemaker.pytorch import PyTorch, PyTorchPredictor, PyTorchModel
  from sagemaker.instance_group import InstanceGroup
  from sagemaker.session_settings import SessionSettings
label_desc: Use image node_id 16 for calling a global function with example usage: test_model_prepare_container_def_no_instance_type_or_image() without return types