code: def _extract_tuning_job_config(tuner):
      """Extract tuning job config from a HyperparameterTuner"""
      tuning_job_config = {
          "Strategy": tuner.strategy,
          "ResourceLimits": {
              "MaxNumberOfTrainingJobs": tuner.max_jobs,
              "MaxParallelTrainingJobs": tuner.max_parallel_jobs,
          },
          "TrainingJobEarlyStoppingType": tuner.early_stopping_type,
      }
  
      if tuner.objective_metric_name:
          tuning_job_config["HyperParameterTuningJobObjective"] = {
              "Type": tuner.objective_type,
              "MetricName": tuner.objective_metric_name,
          }
  
      parameter_ranges = tuner.hyperparameter_ranges()
      if parameter_ranges:
          tuning_job_config["ParameterRanges"] = parameter_ranges
  
      return tuning_job_config
  
imports: from __future__ import print_function, absolute_import
  import os
  import re
  import sagemaker
  from sagemaker import fw_utils, job, utils, s3, session, vpc_utils
  from sagemaker.amazon import amazon_estimator
  from sagemaker.tensorflow import TensorFlow
  from sagemaker.estimator import EstimatorBase
  from sagemaker.processing import Processor
  from sagemaker.utils import format_tags
label_desc: Use image node_id 6 for calling a global function with example usage: _extract_tuning_job_config(tuner) and returns: tuning_job_config