code: def hyperparameters(
      self, hyperparameters: Union[str, dict]
  ) -> ConfigBuilder:
      valid_keys = [
          m
          for m in MODEL_TYPES.keys()
          if m not in ["ENS_WEIGHTED", "SIMPLE_ENS_WEIGHTED"]
      ]
      valid_str_values = list(hyperparameter_config_dict.keys())
      if isinstance(hyperparameters, str):
          assert (
              hyperparameters in hyperparameter_config_dict
          ), f"{hyperparameters} is not one of the valid presets {valid_str_values}"
      elif isinstance(hyperparameters, dict):
          unknown_keys = [
              k
              for k in hyperparameters.keys()
              if isinstance(k, str) and (k not in valid_keys)
          ]
          assert (
              len(unknown_keys) == 0
          ), f"The following model types are not recognized: {unknown_keys} - use one of the valid models: {valid_keys}"
      else:
          raise ValueError(
              f"hyperparameters must be either str: {valid_str_values} or dict with keys of {valid_keys}"
          )
      self.config["hyperparameters"] = hyperparameters
      return self
  
imports: from __future__ import annotations
  import copy
  from typing import Union
  from sklearn.base import BaseEstimator
  from autogluon.core.scheduler import scheduler_factory
  from autogluon.features import AutoMLPipelineFeatureGenerator
  from autogluon.tabular.configs.hyperparameter_configs import hyperparameter_config_dict
  from autogluon.tabular.configs.presets_configs import tabular_presets_dict
  from autogluon.tabular.trainer.model_presets.presets import MODEL_TYPES
label_desc: Use image node_id 4 for calling the ConfigBuilder obj's underlying member method code with example usage: obj.hyperparameters(hyperparameters) and returns: self