code: def test_check_stats_estimator(model_name, data, test):
      """Tests the check_stats functionality on the data"""
  
      exp = TSForecastingExperiment()
  
      # Reduced fh since we are testing with small dataset as well
      fh = 1
      fold = 2
  
      exp.setup(
          data=data,
          fh=fh,
          fold=fold,
          fold_strategy="sliding",
          verbose=False,
          session_id=42,
      )
      model = exp.create_model(model_name)
  
      expected_column_order = [
          "Test",
          "Test Name",
          "Data",
          "Property",
          "Setting",
          "Value",
      ]
  
      ##########################
      # Individual Tests ####
      ##########################
      # Column Order ----
      results = exp.check_stats(model, test=test)
      if results is not None:
          # Results will be none if residuals can not be computed
          column_names = list(results.columns)
          for i, name in enumerate(expected_column_order):
              assert column_names[i] == name
  
          # Data Names ----
          expected_data_names = ["Residual"]
          data_names = results["Data"].unique().tolist()
          for i, expected_name in enumerate(data_names):
              assert data_names[i] in expected_data_names
  
      ###################################################
      # Individual Tests with "order" differences ####
      ###################################################
      # Column Order ----
      results = exp.check_stats(
          model, test=test, data_kwargs={"order_list": [1, 2]}
      )
      if results is not None:
          # Results will be none if residuals can not be computed
          column_names = list(results.columns)
          for i, name in enumerate(expected_column_order):
              assert column_names[i] == name
  
          # Data Names ----
          expected_data_names = ["Residual", "Order=1", "Order=2"]
          data_names = results["Data"].unique().tolist()
          for i, expected_name in enumerate(data_names):
              assert data_names[i] in expected_data_names
  
      ##################################################
      # Individual Tests with "lags" differences ####
      ##################################################
      # Column Order ----
      results = exp.check_stats(
          model, test=test, data_kwargs={"lags_list": [1, [1, 12]]}
      )
      if results is not None:
          # Results will be none if residuals can not be computed
          column_names = list(results.columns)
          for i, name in enumerate(expected_column_order):
              assert column_names[i] == name
  
          # Data Names ----
          expected_data_names = ["Residual", "Lags=1", "Lags=[1, 12]"]
          data_names = results["Data"].unique().tolist()
          for i, expected_name in enumerate(data_names):
              assert data_names[i] in expected_data_names
  
imports: import pytest
  from time_series_test_utils import _ALL_DATA_TYPES, _ALL_STATS_TESTS, _ALL_STATS_TESTS_MISSING_DATA, _return_data_big_small, _return_model_names_for_plots_stats
  from pycaret.time_series import TSForecastingExperiment
  from pycaret.utils.time_series.exceptions import MissingDataError
label_desc: Use image node_id 2 for calling a global function with example usage: test_check_stats_estimator(model_name, data, test) without return types