code: def test_attach_deploy(
      sklearn_training_job, sagemaker_session, cpu_instance_type
  ):
      endpoint_name = unique_name_from_base(
          "test-sklearn-attach-deploy"
      )
  
      with timeout_and_delete_endpoint_by_name(
          endpoint_name, sagemaker_session
      ):
          estimator = SKLearn.attach(
              sklearn_training_job, sagemaker_session=sagemaker_session
          )
          predictor = estimator.deploy(
              1, cpu_instance_type, endpoint_name=endpoint_name
          )
          _predict_and_assert(predictor)
  
imports: from __future__ import absolute_import
  import os
  import time
  import pytest
  import numpy
  from sagemaker.serverless import ServerlessInferenceConfig
  from sagemaker.sklearn import SKLearn, SKLearnModel, SKLearnProcessor
  from sagemaker.utils import unique_name_from_base
  from tests.integ import DATA_DIR, TRAINING_DEFAULT_TIMEOUT_MINUTES
  from tests.integ.timeout import timeout, timeout_and_delete_endpoint_by_name
label_desc: Use image node_id 4 for calling a global function with example usage: test_attach_deploy(sklearn_training_job, sagemaker_session, cpu_instance_type) without return types