code: def test_given_long_time_series_passed_to_model_then_preprocess_receives_shortened_time_series(
      temp_model_path, model_type, differences
  ):
      max_num_samples = 1000
      prediction_length = 17
      data = get_data_frame_with_variable_lengths(
          {"A": 1_000_000}, freq="T"
      )
      model = model_type(
          path=temp_model_path,
          freq=data.freq,
          hyperparameters={
              "max_num_samples": max_num_samples,
              "differences": differences,
          },
          prediction_length=prediction_length,
      )
      with mock.patch(
          "mlforecast.MLForecast.preprocess"
      ) as mock_preprocess:
          try:
              model.fit(train_data=data)
          # using mock leads to AssertionError
          except AssertionError:
              pass
          received_mlforecast_df = mock_preprocess.call_args[0][0]
          assert len(
              received_mlforecast_df
          ) == max_num_samples + prediction_length + sum(differences)
  
file_path: autogluon/timeseries/tests/unittests/models/test_mlforecast.py
imports: from unittest import mock
  import numpy
  import pandas
  import pytest
  from autogluon.timeseries import TimeSeriesDataFrame
  from autogluon.timeseries.models.autogluon_tabular.mlforecast import DirectTabularModel, RecursiveTabularModel
  from autogluon.timeseries.utils.features import TimeSeriesFeatureGenerator
  from autogluon.timeseries.utils.forecast import get_forecast_horizon_index_ts_dataframe
  from ..common import DATAFRAME_WITH_COVARIATES, DATAFRAME_WITH_STATIC, DUMMY_VARIABLE_LENGTH_TS_DATAFRAME, get_data_frame_with_variable_lengths
label_desc: Use image node_id 5 for calling a global function with example usage: test_given_long_time_series_passed_to_model_then_preprocess_receives_shortened_time_series(temp_model_path, model_type, differences) without return types