code: def test_pytorch_ddp_distribution_configuration_unsupported(
      sagemaker_session,
  ):
      unsupported_framework_version = "1.9.1"
      unsupported_py_version = "py2"
      with pytest.raises(ValueError) as error:
          _pytorch_estimator(
              sagemaker_session,
              framework_version=unsupported_framework_version,
              py_version=unsupported_py_version,
              distribution=DISTRIBUTION_PYTORCH_DDP_ENABLED,
          )
      assert (
          f"framework_version {unsupported_framework_version} is not supported"
      ) in str(error)
      assert (
          f"py_version {unsupported_py_version} is not supported"
      ) 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 31 for calling a global function with example usage: test_pytorch_ddp_distribution_configuration_unsupported(sagemaker_session) without return types