code: def test_require_image_uri_if_fw_ver_is_less_than_1_11(
      sagemaker_session,
      tensorflow_training_version,
      tensorflow_training_py_version,
  ):
      if version.Version(tensorflow_training_version) > version.Version(
          "1.10"
      ):
          pytest.skip("This test is for TF 1.10 and lower.")
  
      with pytest.raises(ValueError) as e:
          _build_tf(
              sagemaker_session,
              framework_version=tensorflow_training_version,
              py_version=tensorflow_training_py_version,
          )
  
      expected_msg = (
          "TF {version} supports only legacy mode. Please supply the image URI directly with "
          "'image_uri=520713654638.dkr.ecr.{region}.amazonaws.com/"
          "sagemaker-tensorflow:{version}-cpu-py2' and set 'model_dir=False'. If you are using any "
          "legacy parameters (training_steps, evaluation_steps, checkpoint_path, requirements_file), "
          "make sure to pass them directly as hyperparameters instead."
      ).format(version=tensorflow_training_version, region=REGION)
  
      assert expected_msg in str(e.value)
  
file_path: sagemaker-python-sdk/tests/unit/sagemaker/tensorflow/test_estimator_init.py
imports: from __future__ import absolute_import
  from mock import Mock, patch
  from packaging import version
  import pytest
  from sagemaker.tensorflow import TensorFlow
label_desc: Use image node_id 13 for calling a global function with example usage: test_require_image_uri_if_fw_ver_is_less_than_1_11(sagemaker_session, tensorflow_training_version, tensorflow_training_py_version) without return types