code: def _upgrade_preprocessing_defaults(
      config: ModelConfigDict,
  ) -> ModelConfigDict:
      """Move feature-specific preprocessing parameters into defaults in config (in-place)"""
      type_specific_preprocessing_params = dict()
  
      # If preprocessing section specified and it contains feature specific preprocessing parameters,
      # make a copy and delete it from the preprocessing section
      for parameter in list(config.get(PREPROCESSING, {})):
          if parameter in get_base_type_registry():
              warnings.warn(
                  f"Moving preprocessing configuration for `{parameter}` feature type from `preprocessing` section"
                  " to `defaults` section in Ludwig config. This will be unsupported in v0.8.",
                  DeprecationWarning,
              )
              type_specific_preprocessing_params[parameter] = config[
                  PREPROCESSING
              ].pop(parameter)
  
          if parameter == "numerical":
              warnings.warn(
                  f"Moving preprocessing configuration for `{parameter}` feature type from `preprocessing` section"
                  " to `defaults` section in Ludwig config. This will be unsupported in v0.8.",
                  DeprecationWarning,
              )
              type_specific_preprocessing_params[NUMBER] = config[
                  PREPROCESSING
              ].pop(parameter)
  
      # Delete empty preprocessing section if no other preprocessing parameters specified
      if PREPROCESSING in config and not config[PREPROCESSING]:
          del config[PREPROCESSING]
  
      # Update defaults with the default feature specific preprocessing parameters
      defaults = config.get(DEFAULTS, {})
      for (
          feature_type,
          preprocessing_param,
      ) in type_specific_preprocessing_params.items():
          if PREPROCESSING in preprocessing_param:
              preprocessing_param = preprocessing_param[PREPROCESSING]
  
          if feature_type == AUDIO:
              preprocessing_param = upgrade_audio_preprocessing(
                  preprocessing_param
              )
  
          # If defaults was empty, then create a new key with feature type
          if feature_type not in defaults:
              defaults[feature_type] = {
                  PREPROCESSING: preprocessing_param
              }
          # Feature type exists but preprocessing hasn't be specified
          elif PREPROCESSING not in defaults[feature_type]:
              defaults[feature_type][
                  PREPROCESSING
              ] = preprocessing_param
          # Update default feature specific preprocessing with parameters from config
          else:
              defaults[feature_type][PREPROCESSING].update(
                  merge_dict(
                      defaults[feature_type][PREPROCESSING],
                      preprocessing_param,
                  )
              )
  
      if defaults:
          config[DEFAULTS] = defaults
  
      return config
  
imports: import copy
  import logging
  import warnings
  from typing import Any, Callable, Dict, List, Union
  from ludwig.api_annotations import DeveloperAPI
  from ludwig.constants import AUDIO, BIAS, CLASS_WEIGHTS, COLUMN, CONV_BIAS, CONV_USE_BIAS, DECODER, DEFAULT_BIAS, DEFAULT_USE_BIAS, DEFAULTS, ENCODER, EVAL_BATCH_SIZE, EXECUTOR, FORCE_SPLIT, HEIGHT, HYPEROPT, IMAGE, INPUT_FEATURES, LOSS, MISSING_VALUE_STRATEGY, MODEL_ECD, MODEL_GBM, MODEL_TYPE, NAME, NUM_SAMPLES, NUMBER, OUTPUT_FEATURES, PARAMETERS, PREPROCESSING, PROBABILITIES, RANDOM, RAY, SAMPLER, SCHEDULER, SEARCH_ALG, SEQUENCE, SPLIT, SPLIT_PROBABILITIES, STRATIFY, TEXT, TIMESERIES, TRAINER, TRAINING, TYPE, USE_BIAS, WIDTH
  from ludwig.features.feature_registries import get_base_type_registry, get_input_type_registry, get_output_type_registry
  from ludwig.globals import LUDWIG_VERSION
  from ludwig.schema.defaults.gbm import GBMDefaultsConfig
  from ludwig.schema.encoders.utils import get_encoder_cls
  from ludwig.types import FeatureConfigDict, FeatureTypeDefaultsDict, HyperoptConfigDict, ModelConfigDict, PreprocessingConfigDict, TrainerConfigDict, TrainingSetMetadataDict
  from ludwig.utils.metric_utils import TrainerMetric
  from ludwig.utils.misc_utils import get_from_registry, merge_dict
  from ludwig.utils.version_transformation import VersionTransformation, VersionTransformationRegistry
label_desc: Use image node_id 17 for calling a global function with example usage: _upgrade_preprocessing_defaults(config) and returns: config