code: def _extract_training_config_list_from_estimator_dict(
      tuner, inputs, include_cls_metadata, mini_batch_size
  ):
      """Extracts a list of training job configs from a Hyperparameter Tuner.
  
      It uses the ``estimator_dict`` field.
      """
      estimator_names = sorted(tuner.estimator_dict.keys())
      tuner._validate_dict_argument(
          name="inputs", value=inputs, allowed_keys=estimator_names
      )
      tuner._validate_dict_argument(
          name="include_cls_metadata",
          value=include_cls_metadata,
          allowed_keys=estimator_names,
      )
      tuner._validate_dict_argument(
          name="mini_batch_size",
          value=mini_batch_size,
          allowed_keys=estimator_names,
      )
  
      train_config_dict = {}
      for estimator_name, estimator in tuner.estimator_dict.items():
          train_config_dict[estimator_name] = training_base_config(
              estimator=estimator,
              inputs=inputs.get(estimator_name) if inputs else None,
              mini_batch_size=mini_batch_size.get(estimator_name)
              if mini_batch_size
              else None,
          )
  
      tuner._prepare_static_hyperparameters_for_tuning(
          include_cls_metadata=include_cls_metadata
      )
  
      train_config_list = []
      s3_operations_list = []
  
      for estimator_name in sorted(train_config_dict.keys()):
          train_config = train_config_dict[estimator_name]
          train_config.pop("HyperParameters", None)
          train_config[
              "StaticHyperParameters"
          ] = tuner.static_hyperparameters_dict[estimator_name]
  
          train_config["AlgorithmSpecification"][
              "MetricDefinitions"
          ] = tuner.metric_definitions_dict.get(estimator_name)
  
          train_config["DefinitionName"] = estimator_name
          train_config["TuningObjective"] = {
              "Type": tuner.objective_type,
              "MetricName": tuner.objective_metric_name_dict[
                  estimator_name
              ],
          }
          train_config[
              "HyperParameterRanges"
          ] = tuner.hyperparameter_ranges_dict()[estimator_name]
  
          s3_operations_list.append(
              train_config.pop("S3Operations", {})
          )
  
          train_config_list.append(train_config)
  
      return train_config_list, _merge_s3_operations(s3_operations_list)
  
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 8 for calling a global function with example usage: _extract_training_config_list_from_estimator_dict(tuner, inputs, include_cls_metadata, mini_batch_size) and returns: train_config_list,  _merge_s3_operations