class_docstr: A class to infer appropriate Fourier series orders in different
  seasonality components.
  
  The method allows users to:
  
      - optionally remove the trend with different methods.
        Available methods are in `TrendAdjustMethodEnum`.
      - optionally do an aggregation.
      - fits the seasonality component with different Fourier series orders.
      - calculates the AIC/BIC of the fits.
      - choose the most appropriate order with AIC or BIC and an optional tolerance.
      - plot the investigations.
  
  Attributes
  ----------
  df : `pandas.DataFrame` or None
      The input timeseries.
  time_col : `str` or None
      The column name for timestamps in ``df``.
  value_col : `str` or None
      The column name for values in ``df``.
  fourier_series_orders : `dict` or None
      The inferred Fourier series orders.
      The keys are the seasonality component names.
      The values are the inferred best orders according to the config.
  df_features : `pandas.DataFrame` or None
      The cached dataframe with time features.
      Building this df is slow for large dataset.
      We cache it the first time we build it for subsequent uses.
docstr: Does pre-processing which includes:
  
          - adjust trend (optional)
          - aggregation (optional)
  
  Parameters
  ----------
  df : `pandas.DataFrame`
      The input time series.
  time_col : `str`
      The column name for timestamps in ``df``.
  value_col : `str`
      The column name for values in ``df``.
  adjust_trend_method : `str` or None
      The adjustment method. Must be a method specified in
      `~greykite.algo.common.seasonality_inferrer.TrendAdjustMethodEnum`.
  adjust_trend_params : `dict` or None
      Additional parameters for `self._adjust_trend`.
  aggregation_period : `str` or None
      The aggregation period after adjusting the trend.
  
  Returns
  -------
  df_adj : `pandas.DataFrame`
      The df with trend removed.
docstr_tok: ["Does","pre-processing","which","includes",":","-","adjust","trend","(","optional",")","-","aggregation","(","optional",")","Parameters","--","--","--","--","--","df",":","`","pandas.DataFrame","`","The","input","time","series",".","time_col",":","`","str","`","The","column","name","for","timestamps","in","``","df","``",".","value_col",":","`","str","`","The","column","name","for","values","in","``","df","``",".","adjust_trend_method",":","`","str","`","or","None","The","adjustment","method",".","Must","be","a","method","specified","in","`","~greykite.algo.common.seasonality_inferrer.TrendAdjustMethodEnum","`",".","adjust_trend_params",":","`","dict","`","or","None","Additional","parameters","for","`","self._adjust_trend","`",".","aggregation_period",":","`","str","`","or","None","The","aggregation","period","after","adjusting","the","trend",".","Returns","--","--","--","-","df_adj",":","`","pandas.DataFrame","`","The","df","with","trend","removed","."]
code: def _process_df(
      self,
      df: pd.DataFrame,
      time_col: str,
      value_col: str,
      adjust_trend_method: Optional[str],
      adjust_trend_params: Optional[dict],
      aggregation_period: Optional[str],
  ) -> pd.DataFrame:
      """Does pre-processing which includes:
  
              - adjust trend (optional)
              - aggregation (optional)
  
      Parameters
      ----------
      df : `pandas.DataFrame`
          The input time series.
      time_col : `str`
          The column name for timestamps in ``df``.
      value_col : `str`
          The column name for values in ``df``.
      adjust_trend_method : `str` or None
          The adjustment method. Must be a method specified in
          `~greykite.algo.common.seasonality_inferrer.TrendAdjustMethodEnum`.
      adjust_trend_params : `dict` or None
          Additional parameters for `self._adjust_trend`.
      aggregation_period : `str` or None
          The aggregation period after adjusting the trend.
  
      Returns
      -------
      df_adj : `pandas.DataFrame`
          The df with trend removed.
      """
      if adjust_trend_method is not None:
          if adjust_trend_params is None:
              adjust_trend_params = {}
          df_adj = self._adjust_trend(
              df=df,
              time_col=time_col,
              value_col=value_col,
              method=adjust_trend_method,
              **adjust_trend_params,
          )
      else:
          df_adj = df.copy()
  
      if aggregation_period is not None:
          df_adj = (
              df_adj.resample(aggregation_period, on=time_col)
              .mean()
              .reset_index(drop=False)
          )
      return df_adj
  
imports: from dataclasses import dataclass
  from enum import Enum
  from typing import List
  from typing import Optional
  import numpy
  import pandas
  from plotly import graph_objs
  from plotly.colors import DEFAULT_PLOTLY_COLORS
  from plotly.subplots import make_subplots
  from sklearn.linear_model import LinearRegression
  from sklearn.linear_model import RidgeCV
  from sklearn.linear_model import SGDRegressor
  from greykite.common.constants import TIME_COL
  from greykite.common.constants import VALUE_COL
  from greykite.common.constants import TimeFeaturesEnum
  from greykite.common.features.timeseries_features import add_time_features_df
  from greykite.common.features.timeseries_features import fourier_series_multi_fcn
  from greykite.common.features.timeseries_features import get_default_origin_for_time_vars
label_desc: Use image node_id 6 for calling the SeasonalityInferrer obj's underlying member method code with example usage: obj._process_df(df, time_col, value_col, adjust_trend_method, adjust_trend_params, aggregation_period) and returns: df_adj