code: def test_tta_regression(
      regression_data,
      model_config_class,
      continuous_cols,
      categorical_cols,
      aggregate,
  ):
      (train, test, target) = regression_data
      model_config_class, model_config_params = model_config_class
      data_config = DataConfig(
          target=target,
          continuous_cols=continuous_cols,
          categorical_cols=categorical_cols,
          handle_missing_values=True,
          handle_unknown_categories=True,
      )
  
      model_config_params["task"] = "regression"
      if aggregate == "hard_voting":
          with pytest.raises(AssertionError):
              pred_df = _run_tta(
                  model_config_class,
                  model_config_params,
                  data_config,
                  train,
                  test,
                  aggregate,
              )
          return
      else:
          pred_df = _run_tta(
              model_config_class,
              model_config_params,
              data_config,
              train,
              test,
              aggregate,
          )
          assert len(pred_df) == len(test)
      pred_df = _run_tta(
          model_config_class,
          model_config_params,
          data_config,
          train,
          test,
          aggregate,
      )
      assert len(pred_df) == len(test)
  
imports: import copy
  import os
  import numpy
  import pytest
  import torch
  from pytorch_tabular import TabularModel, TabularModelTuner, model_sweep
  from pytorch_tabular.config import DataConfig, OptimizerConfig, TrainerConfig
  from pytorch_tabular.config.config import SSLModelConfig
  from pytorch_tabular.feature_extractor import DeepFeatureExtractor
  from pytorch_tabular.models import AutoIntConfig, CategoryEmbeddingModelConfig, FTTransformerConfig, GANDALFConfig, GatedAdditiveTreeEnsembleConfig, NodeConfig, TabNetModelConfig
  from pytorch_tabular.ssl_models import DenoisingAutoEncoderConfig
  from scipy.stats import randint, uniform
  from sklearn.metrics import accuracy_score, r2_score
  from sklearn.model_selection import KFold
label_desc: Use image node_id 20 for calling a global function with example usage: test_tta_regression(regression_data, model_config_class, continuous_cols, categorical_cols, aggregate) without return types