code: def get_grouped_naive_residuals(
      info: pd.DataFrame, target: str, tss: TimeseriesSettings
  ) -> Tuple[Dict, Dict]:
      """
      Wraps `get_naive_residuals` for a dataframe with multiple co-existing time series.
      """  # noqa
      group_residuals = {}
      group_scale_factors = {}
      grouped = (
          info.groupby(by=tss.group_by)
          if tss.group_by
          else info.groupby(lambda x: "__default")
      )
      for group, subset in grouped:
          if subset.shape[0] > 1:
              residuals, scale_factor = get_naive_residuals(
                  subset[target]
              )  # @TODO: pass m once we handle seasonality
              group_residuals[group] = residuals
              group_scale_factors[group] = scale_factor
      return group_residuals, group_scale_factors
  
file_path: lightwood/lightwood/data/timeseries_analyzer.py
imports: from typing import Dict, Tuple, List
  import numpy
  import pandas
  from type_infer.dtype import dtype
  from lightwood.api.types import TimeseriesSettings
  from lightwood.helpers.ts import get_ts_groups, get_delta, Differencer
  from lightwood.encoder.time_series.helpers.common import generate_target_group_normalizers
label_desc: Use image node_id 3 for calling a global function with example usage: get_grouped_naive_residuals(info, target, tss) and returns: group_residuals,  group_scale_factors