code: def test_sklearn(time, strftime, sagemaker_session, sklearn_version):
      sklearn = SKLearn(
          entry_point=SCRIPT_PATH,
          role=ROLE,
          sagemaker_session=sagemaker_session,
          instance_type=INSTANCE_TYPE,
          py_version=PYTHON_VERSION,
          framework_version=sklearn_version,
      )
  
      inputs = "s3://mybucket/train"
  
      sklearn.fit(inputs=inputs, experiment_config=EXPERIMENT_CONFIG)
  
      sagemaker_call_names = [
          c[0] for c in sagemaker_session.method_calls
      ]
      assert sagemaker_call_names == ["train", "logs_for_job"]
      boto_call_names = [
          c[0] for c in sagemaker_session.boto_session.method_calls
      ]
      assert boto_call_names == ["resource"]
  
      expected_train_args = _create_train_job(sklearn_version)
      expected_train_args["input_config"][0]["DataSource"][
          "S3DataSource"
      ]["S3Uri"] = inputs
      expected_train_args["experiment_config"] = EXPERIMENT_CONFIG
  
      actual_train_args = sagemaker_session.method_calls[0][2]
      assert actual_train_args == expected_train_args
  
      model = sklearn.create_model()
  
      expected_image_base = "246618743249.dkr.ecr.us-west-2.amazonaws.com/sagemaker-scikit-learn:{}-cpu-{}"
      assert {
          "Environment": {
              "SAGEMAKER_SUBMIT_DIRECTORY": "s3://mybucket/sagemaker-scikit-learn-{}/source/sourcedir.tar.gz".format(
                  TIMESTAMP
              ),
              "SAGEMAKER_PROGRAM": "dummy_script.py",
              "SAGEMAKER_REGION": "us-west-2",
              "SAGEMAKER_CONTAINER_LOG_LEVEL": "20",
          },
          "Image": expected_image_base.format(
              sklearn_version, PYTHON_VERSION
          ),
          "ModelDataUrl": "s3://m/m.tar.gz",
      } == model.prepare_container_def(CPU)
  
      assert "cpu" in model.prepare_container_def(CPU)["Image"]
      predictor = sklearn.deploy(1, CPU)
      assert isinstance(predictor, SKLearnPredictor)
  
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 11 for calling a global function with example usage: test_sklearn(time, strftime, sagemaker_session, sklearn_version) without return types