code: def _add_transfer_config(
      base_config: Dict, ref_configs: Dict
  ) -> Dict:
      base_model_type = base_config[COMBINER][TYPE]
      base_model_numeric_ratio = _get_ratio_numeric_input_features(
          base_config["input_features"]
      )
      min_numeric_ratio_distance = 1.0
      min_dataset = None
  
      for dataset in ref_configs["datasets"]:
          dataset_config = dataset[CONFIG]
          if base_model_type == dataset_config[COMBINER][TYPE]:
              dataset_numeric_ratio = _get_ratio_numeric_input_features(
                  dataset_config["input_features"]
              )
              ratio_distance = abs(
                  base_model_numeric_ratio - dataset_numeric_ratio
              )
              if ratio_distance <= min_numeric_ratio_distance:
                  min_numeric_ratio_distance = ratio_distance
                  min_dataset = dataset
  
      if min_dataset is not None:
          logger.info(
              "Transfer config from dataset {}".format(
                  min_dataset["name"]
              )
          )
          min_dataset_config = min_dataset[CONFIG]
          hyperopt_params = base_config[HYPEROPT][PARAMETERS]
          point_to_evaluate = {}
          _add_option_to_evaluate(
              point_to_evaluate,
              min_dataset_config,
              hyperopt_params,
              COMBINER,
          )
          _add_option_to_evaluate(
              point_to_evaluate,
              min_dataset_config,
              hyperopt_params,
              TRAINER,
          )
          base_config[HYPEROPT][SEARCH_ALG]["points_to_evaluate"] = [
              point_to_evaluate
          ]
      return base_config
  
file_path: ludwig/ludwig/utils/automl/utils.py
imports: import bisect
  import logging
  from typing import Dict
  from numpy import nan_to_num
  from pandas import Series
  from ludwig.api_annotations import DeveloperAPI
  from ludwig.constants import BINARY, CATEGORY, COMBINER, CONFIG, HYPEROPT, IMBALANCE_DETECTION_RATIO, NAME, NUMBER, PARAMETERS, SEARCH_ALG, TRAINER, TYPE
  from ludwig.features.feature_registries import get_output_type_registry
  from ludwig.modules.metric_registry import get_metric_objective
  from ludwig.schema.combiners.utils import get_combiner_jsonschema
label_desc: Use image node_id 4 for calling a global function with example usage: _add_transfer_config(base_config, ref_configs) and returns: base_config