code: def get_preset_models(
      path,
      problem_type,
      eval_metric,
      hyperparameters,
      level: int = 1,
      ensemble_type=StackerEnsembleModel,
      ensemble_kwargs: dict = None,
      ag_args_fit=None,
      ag_args=None,
      ag_args_ensemble=None,
      name_suffix: str = None,
      default_priorities=None,
      invalid_model_names: list = None,
      included_model_types: list = None,
      excluded_model_types: list = None,
      hyperparameter_preprocess_func=None,
      hyperparameter_preprocess_kwargs=None,
      silent=True,
  ):
      hyperparameters = process_hyperparameters(hyperparameters)
      if hyperparameter_preprocess_func is not None:
          if hyperparameter_preprocess_kwargs is None:
              hyperparameter_preprocess_kwargs = dict()
          hyperparameters = hyperparameter_preprocess_func(
              hyperparameters, **hyperparameter_preprocess_kwargs
          )
      if problem_type not in [
          BINARY,
          MULTICLASS,
          REGRESSION,
          SOFTCLASS,
          QUANTILE,
      ]:
          raise NotImplementedError
      invalid_name_set = set()
      if invalid_model_names is not None:
          invalid_name_set.update(invalid_model_names)
  
      if default_priorities is None:
          default_priorities = copy.deepcopy(DEFAULT_MODEL_PRIORITY)
          if problem_type in PROBLEM_TYPE_MODEL_PRIORITY:
              default_priorities.update(
                  PROBLEM_TYPE_MODEL_PRIORITY[problem_type]
              )
  
      level_key = (
          level if level in hyperparameters.keys() else "default"
      )
      if (
          level_key not in hyperparameters.keys()
          and level_key == "default"
      ):
          hyperparameters = {"default": hyperparameters}
      hp_level = hyperparameters[level_key]
      hp_level = ModelFilter.filter_models(
          models=hp_level,
          included_model_types=included_model_types,
          excluded_model_types=excluded_model_types,
      )
      model_cfg_priority_dict = defaultdict(list)
      model_type_list = list(hp_level.keys())
      for model_type in model_type_list:
          models_of_type = hp_level[model_type]
          if not isinstance(models_of_type, list):
              models_of_type = [models_of_type]
          model_cfgs_to_process = []
          for model_cfg in models_of_type:
              if isinstance(model_cfg, str):
                  if (
                      model_type == "AG_TEXT_NN"
                      or model_type == "AG_AUTOMM"
                  ):
                      model_cfgs_to_process.append({})
                  else:
                      model_cfgs_to_process += get_preset_custom(
                          name=model_cfg, problem_type=problem_type
                      )
              else:
                  model_cfgs_to_process.append(model_cfg)
          for model_cfg in model_cfgs_to_process:
              model_cfg = clean_model_cfg(
                  model_cfg=model_cfg,
                  model_type=model_type,
                  ag_args=ag_args,
                  ag_args_ensemble=ag_args_ensemble,
                  ag_args_fit=ag_args_fit,
                  problem_type=problem_type,
              )
              model_cfg[AG_ARGS]["priority"] = model_cfg[AG_ARGS].get(
                  "priority",
                  default_priorities.get(
                      model_type, DEFAULT_CUSTOM_MODEL_PRIORITY
                  ),
              )
              model_priority = model_cfg[AG_ARGS]["priority"]
              # Check if model_cfg is valid
              is_valid = is_model_cfg_valid(
                  model_cfg, level=level, problem_type=problem_type
              )
              if (
                  AG_ARGS_FIT in model_cfg
                  and not model_cfg[AG_ARGS_FIT]
              ):
                  model_cfg.pop(AG_ARGS_FIT)
              if is_valid:
                  model_cfg_priority_dict[model_priority].append(
                      model_cfg
                  )
  
      model_cfg_priority_list = [
          model
          for priority in sorted(
              model_cfg_priority_dict.keys(), reverse=True
          )
          for model in model_cfg_priority_dict[priority]
      ]
  
      if not silent:
          logger.log(
              20, "Model configs that will be trained (in order):"
          )
      models = []
      model_args_fit = {}
      for model_cfg in model_cfg_priority_list:
          model = model_factory(
              model_cfg,
              path=path,
              problem_type=problem_type,
              eval_metric=eval_metric,
              name_suffix=name_suffix,
              ensemble_type=ensemble_type,
              ensemble_kwargs=ensemble_kwargs,
              invalid_name_set=invalid_name_set,
              level=level,
          )
          invalid_name_set.add(model.name)
          if "hyperparameter_tune_kwargs" in model_cfg[AG_ARGS]:
              model_args_fit[model.name] = {
                  "hyperparameter_tune_kwargs": model_cfg[AG_ARGS][
                      "hyperparameter_tune_kwargs"
                  ]
              }
          if (
              "ag_args_ensemble" in model_cfg
              and not model_cfg["ag_args_ensemble"]
          ):
              model_cfg.pop("ag_args_ensemble")
          if not silent:
              logger.log(20, f"\t{model.name}: \t{model_cfg}")
          models.append(model)
      return models, model_args_fit
  
file_path: autogluon/tabular/src/autogluon/tabular/trainer/model_presets/presets.py
imports: import copy
  import inspect
  import logging
  from collections import defaultdict
  from autogluon.common.model_filter import ModelFilter
  from autogluon.core.constants import AG_ARGS, AG_ARGS_ENSEMBLE, AG_ARGS_FIT, BINARY, MULTICLASS, QUANTILE, REGRESSION, SOFTCLASS
  from autogluon.core.models import AbstractModel, DummyModel, GreedyWeightedEnsembleModel, SimpleWeightedEnsembleModel, StackerEnsembleModel
  from autogluon.core.trainer.utils import process_hyperparameters
  from ...models import BoostedRulesModel, CatBoostModel, FastTextModel, FigsModel, FTTransformerModel, GreedyTreeModel, HSTreeModel, ImagePredictorModel, KNNModel, LGBModel, LinearModel, MultiModalPredictorModel, NNFastAiTabularModel, RFModel, RuleFitModel, TabPFNModel, TabularNeuralNetTorchModel, TextPredictorModel, VowpalWabbitModel, XGBoostModel, XTModel
  from ...models.tab_transformer.tab_transformer_model import TabTransformerModel
  from .presets_custom import get_preset_custom
label_desc: Use image node_id 1 for calling a global function with example usage: get_preset_models(path, problem_type, eval_metric, hyperparameters, level, ensemble_type, ensemble_kwargs, ag_args_fit, ag_args, ag_args_ensemble, name_suffix, default_priorities, invalid_model_names, included_model_types, excluded_model_types, hyperparameter_preprocess_func, hyperparameter_preprocess_kwargs, silent) and returns: models,  model_args_fit