def test_from_data_frame_time_series_data_set_multi_call(patch_time_series_data_set):
    """Tests that ``TabularForecastingData.from_data_frame`` calls ``TimeSeriesDataSet`` with the expected parameters
    when called separately for each stage."""
    patch_time_series_data_set.return_value.get_parameters.return_value = {"test": None}

    train_data = MagicMock()
    val_data = MagicMock()

    train_datamodule = TabularForecastingData.from_data_frame(
        "time_idx",
        "target",
        ["series"],
        train_data_frame=train_data,
        additional_kwarg="test",
        batch_size=4,
    )

    TabularForecastingData.from_data_frame(
        val_data_frame=val_data,
        parameters=train_datamodule.parameters,
        batch_size=4,
    )

    patch_time_series_data_set.assert_called_once_with(
        train_data, time_idx="time_idx", group_ids=["series"], target="target", additional_kwarg="test"
    )

    patch_time_series_data_set.from_parameters.assert_called_once_with(
        {"test": None}, val_data, stop_randomization=True
    )
Tests that ``TabularForecastingData.from_data_frame`` calls ``TimeSeriesDataSet`` with the expected parameters
    when called separately for each stage.
tests/tabular/forecasting/test_data.py