code: def update_config_with_metadata(
      config_obj: "ModelConfig", training_set_metadata: Dict[str, Any]
  ):
      # populate input features fields depending on data
      for input_feature in config_obj.input_features:
          feature = get_from_registry(
              input_feature.type, get_input_type_registry()
          )
          feature.update_config_with_metadata(
              input_feature, training_set_metadata[input_feature.name]
          )
  
      # populate output features fields depending on data
      for output_feature in config_obj.output_features:
          feature = get_from_registry(
              output_feature.type, get_output_type_registry()
          )
          feature.update_config_with_metadata(
              output_feature, training_set_metadata[output_feature.name]
          )
  
imports: from typing import Any, Dict, TYPE_CHECKING
  from ludwig.api_annotations import DeveloperAPI
  from ludwig.constants import AUDIO, BAG, BINARY, CATEGORY, CATEGORY_DISTRIBUTION, DATE, H3, IMAGE, NUMBER, SEQUENCE, SET, TEXT, TIMESERIES, VECTOR
  from ludwig.features.audio_feature import AudioFeatureMixin, AudioInputFeature
  from ludwig.features.bag_feature import BagFeatureMixin, BagInputFeature
  from ludwig.features.binary_feature import BinaryFeatureMixin, BinaryInputFeature, BinaryOutputFeature
  from ludwig.features.category_feature import CategoryDistributionFeatureMixin, CategoryDistributionOutputFeature, CategoryFeatureMixin, CategoryInputFeature, CategoryOutputFeature
  from ludwig.features.date_feature import DateFeatureMixin, DateInputFeature
  from ludwig.features.h3_feature import H3FeatureMixin, H3InputFeature
  from ludwig.features.image_feature import ImageFeatureMixin, ImageInputFeature
  from ludwig.features.number_feature import NumberFeatureMixin, NumberInputFeature, NumberOutputFeature
  from ludwig.features.sequence_feature import SequenceFeatureMixin, SequenceInputFeature, SequenceOutputFeature
  from ludwig.features.set_feature import SetFeatureMixin, SetInputFeature, SetOutputFeature
  from ludwig.features.text_feature import TextFeatureMixin, TextInputFeature, TextOutputFeature
  from ludwig.features.timeseries_feature import TimeseriesFeatureMixin, TimeseriesInputFeature, TimeseriesOutputFeature
  from ludwig.features.vector_feature import VectorFeatureMixin, VectorInputFeature, VectorOutputFeature
  from ludwig.utils.misc_utils import get_from_registry
label_desc: Use image node_id 4 for calling a global function with example usage: update_config_with_metadata(config_obj, training_set_metadata) without return types