code: def test_py2_version_is_not_deprecated(sagemaker_session):
      estimator = _build_tf(
          sagemaker_session,
          framework_version="1.15.0",
          py_version="py2",
      )
      assert estimator.py_version == "py2"
      estimator = _build_tf(
          sagemaker_session, framework_version="2.0.0", py_version="py2"
      )
      assert estimator.py_version == "py2"
  
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 5 for calling a global function with example usage: test_py2_version_is_not_deprecated(sagemaker_session) without return types