code: def get_insample_cv_results(model_args, df):
      """Gets insample cross validation results"""
      season_length = get_season_length(model_args["frequency"])
      if model_args["model_name"] == "auto":
          models = [
              model(season_length=season_length)
              for model in model_dict.values()
          ]
      else:
          models = [
              model_dict[model_args["model_name"]](
                  season_length=season_length
              )
          ]
  
      sf = StatsForecast(models, model_args["frequency"])
      sf.cross_validation(model_args["horizon"], df, fitted=True)
      results_df = sf.cross_validation_fitted_values()
      return results_df.rename({"CES": "AutoCES"}, axis=1)
  
file_path: mindsdb/mindsdb/integrations/handlers/statsforecast_handler/statsforecast_handler.py
imports: import pandas
  import dill
  from mindsdb.integrations.libs.base import BaseMLEngine
  from mindsdb.integrations.utilities.time_series_utils import transform_to_nixtla_df, get_results_from_nixtla_df, infer_frequency, get_best_model_from_results_df, get_model_accuracy_dict, reconcile_forecasts, get_hierarchy_from_df
  from sklearn.metrics import r2_score
  from statsforecast import StatsForecast
  from statsforecast.models import AutoARIMA, AutoCES, AutoETS, AutoTheta
label_desc: Use image node_id 2 for calling a global function with example usage: get_insample_cv_results(model_args, df) and returns: results_df