code: def test_estimator_py2_deprecation_warning(
      warning, sagemaker_session
  ):
      estimator = _build_tf(
          sagemaker_session, framework_version="2.1.1", py_version="py2"
      )
  
      assert estimator.py_version == "py2"
      warning.assert_called_with("tensorflow", "2.1.1")
  
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 3 for calling a global function with example usage: test_estimator_py2_deprecation_warning(warning, sagemaker_session) without return types