code: def _attach_tuner(sagemaker_session, tuning_job_name):
      print(
          "Attaching hyperparameter tuning job {} to a new tuner instance".format(
              tuning_job_name
          )
      )
      return HyperparameterTuner.attach(
          tuning_job_name,
          sagemaker_session=sagemaker_session,
          estimator_cls={
              ESTIMATOR_FM: "sagemaker.estimator.Estimator",
              ESTIMATOR_KNN: "sagemaker.estimator.Estimator",
          },
      )
  
imports: from __future__ import absolute_import
  import json
  import os
  import pytest
  from sagemaker import image_uris, utils
  from sagemaker.analytics import HyperparameterTuningJobAnalytics
  from sagemaker.deserializers import JSONDeserializer
  from sagemaker.estimator import Estimator
  from sagemaker.serializers import SimpleBaseSerializer
  from sagemaker.tuner import ContinuousParameter, IntegerParameter, HyperparameterTuner
  from tests.integ import datasets, DATA_DIR, TUNING_DEFAULT_TIMEOUT_MINUTES
  from tests.integ.timeout import timeout, timeout_and_delete_endpoint_by_name
label_desc: Use image node_id 10 for calling a global function with example usage: _attach_tuner(sagemaker_session, tuning_job_name) and returns: HyperparameterTuner