code: def check_hyperopt_parameter_dicts(
      config: "ModelConfig",
  ) -> None:  # noqa: F821
      """Checks for hyperopt parameter dicts against their config objects."""
      if config.hyperopt is None:
          return
  
      from ludwig.schema.hyperopt.utils import (
          get_parameter_cls,
          parameter_config_registry,
      )  # noqa: F401
  
      for parameter, space in config.hyperopt.parameters.items():
          # skip nested hyperopt parameters
          if parameter != ".":
              parameter_attribute_path = parameter.split(".")
              passed = False
  
              for root in [
                  config,
                  config.input_features,
                  config.output_features,
              ]:
                  current = root
                  for p in parameter_attribute_path:
                      try:
                          current = current.__getattribute__(p)
                          if p == parameter_attribute_path[-1]:
                              passed = True
                      except AttributeError:
                          break
                  if passed:
                      break
  
              if not passed:
                  raise ConfigValidationError(
                      f"The supplied hyperopt parameter {parameter} is not a valid config field. Check the Ludwig "
                      "docs for the list of valid parameters."
                  )
  
              try:
                  space_cls = get_parameter_cls(space["space"])
                  space_cls.from_dict(space)
              except KeyError:
                  space_types = ", ".join(
                      parameter_config_registry.keys()
                  )
                  raise ConfigValidationError(
                      f"Invalid hyperopt parameter space requested for `hyperopt.parameters.{parameter}`. Valid spaces "
                      f"are {space_types}."
                  )
  
imports: from abc import ABC, abstractmethod
  from re import findall
  from typing import Callable, TYPE_CHECKING
  from transformers import AutoConfig
  from ludwig.api_annotations import DeveloperAPI
  from ludwig.constants import AUDIO, BINARY, CATEGORY, IMAGE, IN_MEMORY, MIN_QUANTIZATION_BITS_FOR_MERGE_AND_UNLOAD, MODEL_ECD, MODEL_GBM, MODEL_LLM, NUMBER, SEQUENCE, SET, TEXT, TIMESERIES, VECTOR
  from ludwig.error import ConfigValidationError
  from ludwig.utils.metric_utils import get_feature_to_metric_names_map_from_feature_collection
  from ludwig.utils.misc_utils import merge_dict
label_desc: Use image node_id 21 for calling a global function with example usage: check_hyperopt_parameter_dicts(config) without return types