code: def test_when_scaler_used_during_fit_then_scales_are_stored(
      temp_model_path, model_type, scaler
  ):
      data = DUMMY_VARIABLE_LENGTH_TS_DATAFRAME.copy()
      model = model_type(
          path=temp_model_path,
          freq=data.freq,
          hyperparameters={
              "scaler": scaler,
              "tabular_hyperparameters": {"DUMMY": {}},
          },
      )
      model.fit(train_data=data)
      scale_per_item = model._get_scale_per_item(data.item_ids)
      assert model._scaler is not None
      assert scale_per_item.index.equals(data.item_ids)
  
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 4 for calling a global function with example usage: test_when_scaler_used_during_fit_then_scales_are_stored(temp_model_path, model_type, scaler) without return types