docstr: Adds a custom seasonality to the model that repeats after every n `seasonal_periods` timesteps.
  An example for `seasonal_periods`: If you have hourly data (frequency='H') and your seasonal cycle repeats
  after 48 hours -> `seasonal_periods=48`.
  
  Apart from `seasonal_periods`, this is very similar to how you would call Facebook Prophet's
  `add_seasonality()` method.
  
  To add conditional seasonalities, provide `condition_name` here, and add a boolean (binary) component/column
  named `condition_name` to the `future_covariates` series passed to `fit()` and `predict()`.
  
  For information about the parameters see:
  `The Prophet source code <https://github.com/facebook/prophet/blob/master/python/prophet/forecaster.py>`.
  For more details on conditional seasonalities see:
  https://facebook.github.io/prophet/docs/seasonality,_holiday_effects,_and_regressors.html#seasonalities-that-depend-on-other-factors
  
  Parameters
  ----------
  name
      name of the seasonality component
  seasonal_periods
      number of timesteps after which the seasonal cycle repeats. This value will be multiplied by the inferred
      number of days for the TimeSeries frequency (e.g. 365.25 for a yearly frequency) to be consistent with the
      `add_seasonality()` method of Facebook Prophet. The inferred number of days can be obtained with
      `model._freq_to_days(series.freq)`, where `model` is the `Prophet` model and `series` is the target series.
  fourier_order
      number of Fourier components to use
  prior_scale
      optionally, a prior scale for this component
  mode
      optionally, 'additive' or 'multiplicative'
  condition_name
      optionally, the name of the condition on which the seasonality depends. If not `None`, expects a
      `future_covariates` time series with a component/column named `condition_name` to be passed to `fit()`
      and `predict()`.
docstr_tok: ["Adds","a","custom","seasonality","to","the","model","that","repeats","after","every","n","`","seasonal_periods","`","timesteps",".","An","example","for","`","seasonal_periods","`",":","If","you","have","hourly","data","(","frequency=","'","H","'",")","and","your","seasonal","cycle","repeats","after","48","hours","-",">","`","seasonal_periods=48","`",".","Apart","from","`","seasonal_periods","`",",","this","is","very","similar","to","how","you","would","call","Facebook","Prophet's","`","add_seasonality","(",")","`","method",".","To","add","conditional","seasonalities",",","provide","`","condition_name","`","here",",","and","add","a","boolean","(","binary",")","component\/column","named","`","condition_name","`","to","the","`","future_covariates","`","series","passed","to","`","fit","(",")","`","and","`","predict","(",")","`",".","For","information","about","the","parameters","see",":","`","The","Prophet","source","code","<","https",":","\/\/github.com\/facebook\/prophet\/blob\/master\/python\/prophet\/forecaster.py",">","`",".","For","more","details","on","conditional","seasonalities","see",":","https",":","\/\/facebook.github.io\/prophet\/docs\/seasonality",",","_holiday_effects",",","_and_regressors.html","#","seasonalities-that-depend-on-other-factors","Parameters","--","--","--","--","--","name","name","of","the","seasonality","component","seasonal_periods","number","of","timesteps","after","which","the","seasonal","cycle","repeats",".","This","value","will","be","multiplied","by","the","inferred","number","of","days","for","the","TimeSeries","frequency","(","e.g",".","365.25","for","a","yearly","frequency",")","to","be","consistent","with","the","`","add_seasonality","(",")","`","method","of","Facebook","Prophet",".","The","inferred","number","of","days","can","be","obtained","with","`","model._freq_to_days","(","series.freq",")","`",",","where","`","model","`","is","the","`","Prophet","`","model","and","`","series","`","is","the","target","series",".","fourier_order","number","of","Fourier","components","to","use","prior_scale","optionally",",","a","prior","scale","for","this","component","mode","optionally",",","'additive","'","or","'multiplicative'","condition_name","optionally",",","the","name","of","the","condition","on","which","the","seasonality","depends",".","If","not","`","None","`",",","expects","a","`","future_covariates","`","time","series","with","a","component\/column","named","`","condition_name","`","to","be","passed","to","`","fit","(",")","`","and","`","predict","(",")","`","."]
code: def add_seasonality(
      self,
      name: str,
      seasonal_periods: Union[int, float],
      fourier_order: int,
      prior_scale: Optional[float] = None,
      mode: Optional[str] = None,
      condition_name: Optional[str] = None,
  ) -> None:
      """Adds a custom seasonality to the model that repeats after every n `seasonal_periods` timesteps.
      An example for `seasonal_periods`: If you have hourly data (frequency='H') and your seasonal cycle repeats
      after 48 hours -> `seasonal_periods=48`.
  
      Apart from `seasonal_periods`, this is very similar to how you would call Facebook Prophet's
      `add_seasonality()` method.
  
      To add conditional seasonalities, provide `condition_name` here, and add a boolean (binary) component/column
      named `condition_name` to the `future_covariates` series passed to `fit()` and `predict()`.
  
      For information about the parameters see:
      `The Prophet source code <https://github.com/facebook/prophet/blob/master/python/prophet/forecaster.py>`.
      For more details on conditional seasonalities see:
      https://facebook.github.io/prophet/docs/seasonality,_holiday_effects,_and_regressors.html#seasonalities-that-depend-on-other-factors
  
      Parameters
      ----------
      name
          name of the seasonality component
      seasonal_periods
          number of timesteps after which the seasonal cycle repeats. This value will be multiplied by the inferred
          number of days for the TimeSeries frequency (e.g. 365.25 for a yearly frequency) to be consistent with the
          `add_seasonality()` method of Facebook Prophet. The inferred number of days can be obtained with
          `model._freq_to_days(series.freq)`, where `model` is the `Prophet` model and `series` is the target series.
      fourier_order
          number of Fourier components to use
      prior_scale
          optionally, a prior scale for this component
      mode
          optionally, 'additive' or 'multiplicative'
      condition_name
          optionally, the name of the condition on which the seasonality depends. If not `None`, expects a
          `future_covariates` time series with a component/column named `condition_name` to be passed to `fit()`
          and `predict()`.
      """
      function_call = {
          "name": name,
          "seasonal_periods": seasonal_periods,
          "fourier_order": fourier_order,
          "prior_scale": prior_scale,
          "mode": mode,
          "condition_name": condition_name,
      }
      self._store_add_seasonality_call(seasonality_call=function_call)
  
imports: import logging
  import re
  from typing import Callable, List, Optional, Sequence, Union
  import numpy
  import pandas
  import prophet
  from darts.logging import execute_and_suppress_output, get_logger, raise_if, raise_log
  from darts.models.forecasting.forecasting_model import FutureCovariatesLocalForecastingModel
  from darts.timeseries import TimeSeries
label_desc: Use image node_id 11 for calling the Prophet obj's underlying member method code with example usage: obj.add_seasonality(name, seasonal_periods, fourier_order, prior_scale, mode, condition_name) without return types