code: def defaults_config_generator(
      feature_type: str,
      allow_list: str,
      static_schema: Dict[str, Any] = None,
  ) -> Tuple[ModelConfigDict, pd.DataFrame]:
      """Generate combinatorial configs for the defaults section of the Ludwig config.
  
      Args:
          feature_type: feature type to explore.
          allow_list: top-level parameter of the defaults sections that should be included.
      """
      assert isinstance(allow_list, str)
      assert allow_list in {
          "preprocessing",
          "encoder",
          "decoder",
          "loss",
      }
  
      schema = get_schema() if not static_schema else static_schema
      properties = schema["properties"]["defaults"]["properties"][
          feature_type
      ]["properties"]
      raw_entry = deque([ConfigOption(dict(), False)])
      explored = explore_properties(
          properties,
          parent_parameter_path=f"defaults.{feature_type}",
          dq=raw_entry,
          allow_list=[allow_list],
      )
  
      if allow_list in ["preprocessing", "encoder"]:
          config = FEATURE_TYPE_TO_CONFIG_FOR_ENCODER_PREPROCESSING[
              feature_type
          ]
          config = yaml.safe_load(config)
      else:  # decoder and loss
          config = FEATURE_TYPE_TO_CONFIG_FOR_DECODER_LOSS[feature_type]
          config = yaml.safe_load(config)
  
      config["model_type"] = "ecd"
      config["trainer"] = {"train_steps": 1}
  
      combined_configs = combine_configs(explored, config)
      logging.info(
          f"Generated {len(combined_configs)} for {feature_type} {allow_list} combinatorial tests."
      )
  
      for config, dataset in combined_configs:
          yield config, dataset
  
imports: import logging
  from collections import deque
  from pprint import pprint
  from typing import Any, Dict, Tuple
  import pandas
  import pytest
  import yaml
  from ludwig.api import LudwigModel
  from ludwig.config_sampling.explore_schema import combine_configs, ConfigOption, explore_properties
  from ludwig.config_validation.validation import get_schema
  from ludwig.types import ModelConfigDict
  from .configs import COMBINER_TYPE_TO_COMBINE_FN_MAP, ECD_CONFIG_SECTION_TO_CONFIG, FEATURE_TYPE_TO_CONFIG_FOR_DECODER_LOSS, FEATURE_TYPE_TO_CONFIG_FOR_ENCODER_PREPROCESSING
label_desc: Use image node_id 1 for calling a global function with example usage: defaults_config_generator(feature_type, allow_list, static_schema) without return types