code: def test_estimator_py2_raises(sagemaker_session, sklearn_version):
      with pytest.raises(AttributeError):
          SKLearn(
              entry_point=SCRIPT_PATH,
              role=ROLE,
              sagemaker_session=sagemaker_session,
              instance_count=INSTANCE_COUNT,
              instance_type=INSTANCE_TYPE,
              framework_version=sklearn_version,
              py_version="py2",
          )
  
imports: from __future__ import absolute_import
  import logging
  import json
  import os
  import pytest
  from mock import Mock
  from mock import patch
  from sagemaker.fw_utils import UploadedCode
  from sagemaker.session_settings import SessionSettings
  from sagemaker.sklearn import SKLearn, SKLearnModel, SKLearnPredictor
label_desc: Use image node_id 20 for calling a global function with example usage: test_estimator_py2_raises(sagemaker_session, sklearn_version) without return types