code: def test_model_image_accelerator(sagemaker_session):
      with pytest.raises(ValueError) as error:
          model = PyTorchModel(
              MODEL_DATA,
              role=ROLE,
              entry_point=SCRIPT_PATH,
              sagemaker_session=sagemaker_session,
              framework_version="1.3.1",
              py_version="py2",
          )
          model.deploy(1, CPU, accelerator_type=ACCELERATOR_TYPE)
      assert "Unsupported Python version: py2." in str(error)
  
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 14 for calling a global function with example usage: test_model_image_accelerator(sagemaker_session) without return types