code: def test_regression(
      regression_data,
      multi_target,
      continuous_cols,
      categorical_cols,
      continuous_feature_transform,
      normalize_continuous_features,
      target_range,
  ):
      (train, test, target) = regression_data
      data_config = DataConfig(
          target=target + ["MedInc"] if multi_target else target,
          continuous_cols=continuous_cols,
          categorical_cols=categorical_cols,
          continuous_feature_transform=continuous_feature_transform,
          normalize_continuous_features=normalize_continuous_features,
      )
      model_config_params = {
          "task": "regression",
          "input_embed_dim": 8,
          "num_attn_blocks": 1,
          "num_heads": 2,
      }
      if target_range:
          _target_range = []
          for target in data_config.target:
              _target_range.append(
                  (
                      float(train[target].min()),
                      float(train[target].max()),
                  )
              )
          model_config_params["target_range"] = _target_range
      model_config = TabTransformerConfig(**model_config_params)
      trainer_config = TrainerConfig(
          max_epochs=1,
          checkpoints=None,
          early_stopping=None,
          accelerator="cpu",
          fast_dev_run=True,
      )
      optimizer_config = OptimizerConfig()
  
      tabular_model = TabularModel(
          data_config=data_config,
          model_config=model_config,
          optimizer_config=optimizer_config,
          trainer_config=trainer_config,
      )
      tabular_model.fit(train=train)
  
      result = tabular_model.evaluate(test)
      assert "test_mean_squared_error" in result[0].keys()
      pred_df = tabular_model.predict(test)
      assert pred_df.shape[0] == test.shape[0]
  
imports: import pytest
  from pytorch_tabular import TabularModel
  from pytorch_tabular.categorical_encoders import CategoricalEmbeddingTransformer
  from pytorch_tabular.config import DataConfig, OptimizerConfig, TrainerConfig
  from pytorch_tabular.models import TabTransformerConfig
label_desc: Use image node_id 1 for calling a global function with example usage: test_regression(regression_data, multi_target, continuous_cols, categorical_cols, continuous_feature_transform, normalize_continuous_features, target_range) without return types