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: Checks and overrides the input parameters, and makes sure the values are valid.
  
  Parameters
  ----------
  configs : `list` [`SeasonalityInferConfig`]
      A list of `~greykite.algo.common.seasonality_inferrer.SeasonalityInferConfig`
      objects. Each element corresponds to the config for a seasonality component.
      For example, if you would like to infer seasonality orders for yearly seasonality and
      weekly seasonality, you need to provide a list of two configs.
  adjust_trend_method : `str` or None, default None
      The methods used to adjust trend.
      Supported methods are in `AdjustTrendMethodEnum`.
      If not None, value is used to override all configs.
  adjust_trend_param : `dict` or None, default None
      Additional parameters for adjusting trend.
      For valid options, see
      `~greykite.algo.common.seasonality_inferrer.SeasonalityInferrer._adjust_trend`.
      If not None, value is used to override all configs.
  fit_algorithm : `str` or None, default None
      The algorithms used to fit the seasonality.
      Supported algorithms are "linear", "ridge" and "sgd".
      If not None, value is used to override all configs.
  plotting : `bool` or None, default None
      Whether to generate plots.
      If True, the returned dictionary will have plot via the "fig" key.
      Can turn this off to speed up the process.
      If not None, value is used to override all configs.
  tolerance : `float` or None, default None
      A tolerance on the criterion to allow a smaller order.
      For example, if AIC's minimum is 100 and ``tolerance`` is 0.1,
      then the function will find the smallest order that has AIC less than or equal to 110.
      If not None, value is used to override all configs.
  aggregation_period : `str` or None, default None
      The aggregation periods before fitting the Fourier series.
      Having aggregation to eliminate shorter seasonal periods may help get more accurate orders.
      But also make sure the number of observations after aggregation is sufficient.
      (At least 2 *  max_order + 1 to have a unique solution for the regression problem)
      If not None, value is used to override all configs.
  offset : `int` or None, default None
      The offset order to be added to the inferred orders.
      The orders after applying offsets can not be negative.
      If not None, value is used to override all configs.
  criterion : `str` or None, default None
      The criteria to pick the most appropriate orders.
      If not None, value is used to override all configs.
  
  Returns
  -------
  configs : `list` [`SeasonalityInferConfig`]
      A list of `~greykite.algo.common.seasonality_inferrer.SeasonalityInferConfig`
      objects. The values are checked and overridden if needed.
docstr_tok: ["Checks","and","overrides","the","input","parameters",",","and","makes","sure","the","values","are","valid",".","Parameters","--","--","--","--","--","configs",":","`","list","`","[","`","SeasonalityInferConfig","`","]","A","list","of","`","~greykite.algo.common.seasonality_inferrer.SeasonalityInferConfig","`","objects",".","Each","element","corresponds","to","the","config","for","a","seasonality","component",".","For","example",",","if","you","would","like","to","infer","seasonality","orders","for","yearly","seasonality","and","weekly","seasonality",",","you","need","to","provide","a","list","of","two","configs",".","adjust_trend_method",":","`","str","`","or","None",",","default","None","The","methods","used","to","adjust","trend",".","Supported","methods","are","in","`","AdjustTrendMethodEnum","`",".","If","not","None",",","value","is","used","to","override","all","configs",".","adjust_trend_param",":","`","dict","`","or","None",",","default","None","Additional","parameters","for","adjusting","trend",".","For","valid","options",",","see","`","~greykite.algo.common.seasonality_inferrer.SeasonalityInferrer._adjust_trend","`",".","If","not","None",",","value","is","used","to","override","all","configs",".","fit_algorithm",":","`","str","`","or","None",",","default","None","The","algorithms","used","to","fit","the","seasonality",".","Supported","algorithms","are","``","linear","''",",","``","ridge","''","and","``","sgd","''",".","If","not","None",",","value","is","used","to","override","all","configs",".","plotting",":","`","bool","`","or","None",",","default","None","Whether","to","generate","plots",".","If","True",",","the","returned","dictionary","will","have","plot","via","the","``","fig","''","key",".","Can","turn","this","off","to","speed","up","the","process",".","If","not","None",",","value","is","used","to","override","all","configs",".","tolerance",":","`","float","`","or","None",",","default","None","A","tolerance","on","the","criterion","to","allow","a","smaller","order",".","For","example",",","if","AIC","'s","minimum","is","100","and","``","tolerance","``","is","0.1",",","then","the","function","will","find","the","smallest","order","that","has","AIC","less","than","or","equal","to","110",".","If","not","None",",","value","is","used","to","override","all","configs",".","aggregation_period",":","`","str","`","or","None",",","default","None","The","aggregation","periods","before","fitting","the","Fourier","series",".","Having","aggregation","to","eliminate","shorter","seasonal","periods","may","help","get","more","accurate","orders",".","But","also","make","sure","the","number","of","observations","after","aggregation","is","sufficient",".","(","At","least","2","*","max_order","+","1","to","have","a","unique","solution","for","the","regression","problem",")","If","not","None",",","value","is","used","to","override","all","configs",".","offset",":","`","int","`","or","None",",","default","None","The","offset","order","to","be","added","to","the","inferred","orders",".","The","orders","after","applying","offsets","can","not","be","negative",".","If","not","None",",","value","is","used","to","override","all","configs",".","criterion",":","`","str","`","or","None",",","default","None","The","criteria","to","pick","the","most","appropriate","orders",".","If","not","None",",","value","is","used","to","override","all","configs",".","Returns","--","--","--","-","configs",":","`","list","`","[","`","SeasonalityInferConfig","`","]","A","list","of","`","~greykite.algo.common.seasonality_inferrer.SeasonalityInferConfig","`","objects",".","The","values","are","checked","and","overridden","if","needed","."]
code: def _process_params(
      self,
      configs: List[SeasonalityInferConfig],
      adjust_trend_method: Optional[str],
      adjust_trend_param: Optional[dict],
      fit_algorithm: Optional[str],
      tolerance: Optional[float],
      plotting: Optional[bool],
      aggregation_period: Optional[str],
      offset: Optional[int],
      criterion: Optional[str],
  ) -> List[SeasonalityInferConfig]:
      """Checks and overrides the input parameters, and makes sure the values are valid.
  
      Parameters
      ----------
      configs : `list` [`SeasonalityInferConfig`]
          A list of `~greykite.algo.common.seasonality_inferrer.SeasonalityInferConfig`
          objects. Each element corresponds to the config for a seasonality component.
          For example, if you would like to infer seasonality orders for yearly seasonality and
          weekly seasonality, you need to provide a list of two configs.
      adjust_trend_method : `str` or None, default None
          The methods used to adjust trend.
          Supported methods are in `AdjustTrendMethodEnum`.
          If not None, value is used to override all configs.
      adjust_trend_param : `dict` or None, default None
          Additional parameters for adjusting trend.
          For valid options, see
          `~greykite.algo.common.seasonality_inferrer.SeasonalityInferrer._adjust_trend`.
          If not None, value is used to override all configs.
      fit_algorithm : `str` or None, default None
          The algorithms used to fit the seasonality.
          Supported algorithms are "linear", "ridge" and "sgd".
          If not None, value is used to override all configs.
      plotting : `bool` or None, default None
          Whether to generate plots.
          If True, the returned dictionary will have plot via the "fig" key.
          Can turn this off to speed up the process.
          If not None, value is used to override all configs.
      tolerance : `float` or None, default None
          A tolerance on the criterion to allow a smaller order.
          For example, if AIC's minimum is 100 and ``tolerance`` is 0.1,
          then the function will find the smallest order that has AIC less than or equal to 110.
          If not None, value is used to override all configs.
      aggregation_period : `str` or None, default None
          The aggregation periods before fitting the Fourier series.
          Having aggregation to eliminate shorter seasonal periods may help get more accurate orders.
          But also make sure the number of observations after aggregation is sufficient.
          (At least 2 *  max_order + 1 to have a unique solution for the regression problem)
          If not None, value is used to override all configs.
      offset : `int` or None, default None
          The offset order to be added to the inferred orders.
          The orders after applying offsets can not be negative.
          If not None, value is used to override all configs.
      criterion : `str` or None, default None
          The criteria to pick the most appropriate orders.
          If not None, value is used to override all configs.
  
      Returns
      -------
      configs : `list` [`SeasonalityInferConfig`]
          A list of `~greykite.algo.common.seasonality_inferrer.SeasonalityInferConfig`
          objects. The values are checked and overridden if needed.
      """
      # For each of the optional parameters,
      # checks the value is valid,
      # overrides the value is needed,
      # and fills the None values with defaults.
      for param_name, override_value, default_value, allowed_values in (
          (
              "adjust_trend_method",
              adjust_trend_method,
              TrendAdjustMethodEnum.seasonal_average.name,
              TrendAdjustMethodEnum.__dict__["_member_names_"],
          ),
          ("adjust_trend_param", adjust_trend_param, None, None),
          (
              "fit_algorithm",
              fit_algorithm,
              "ridge",
              ["ridge", "linear", "sgd"],
          ),
          ("tolerance", tolerance, 0.0, None),
          ("plotting", plotting, False, [True, False]),
          ("aggregation_period", aggregation_period, None, None),
          ("offset", offset, 0, None),
          ("criterion", criterion, "bic", ["aic", "bic"]),
      ):
          configs = self._apply_default_value(
              configs=configs,
              param_name=param_name,
              override_value=override_value,
              default_value=default_value,
              allowed_values=allowed_values,
          )
      return configs
  
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 3 for calling the SeasonalityInferrer obj's underlying member method code with example usage: obj._process_params(configs, adjust_trend_method, adjust_trend_param, fit_algorithm, tolerance, plotting, aggregation_period, offset, criterion) and returns: configs