docstr: Checks if the parameters `window` of the scorers are smaller than the maximum window size allowed.
  The maximum size allowed is equal to the output length of the .historical_forecast() applied on `series`.
  It is defined by the parameter `start` and the series’ length.
  
  Parameters
  ----------
  series
      The series given to the .historical_forecast()
  start
      Parameter of the .historical_forecast(): first point of time at which a prediction is computed
      for a future time.
docstr_tok: ["Checks","if","the","parameters","`","window","`","of","the","scorers","are","smaller","than","the","maximum","window","size","allowed",".","The","maximum","size","allowed","is","equal","to","the","output","length","of","the",".historical_forecast","(",")","applied","on","`","series","`",".","It","is","defined","by","the","parameter","`","start","`","and","the","series","\u2019","length",".","Parameters","--","--","--","--","--","series","The","series","given","to","the",".historical_forecast","(",")","start","Parameter","of","the",".historical_forecast","(",")",":","first","point","of","time","at","which","a","prediction","is","computed","for","a","future","time","."]
code: def _check_window_size(
      self,
      series: Sequence[TimeSeries],
      start: Union[pd.Timestamp, float, int],
  ):
      """Checks if the parameters `window` of the scorers are smaller than the maximum window size allowed.
      The maximum size allowed is equal to the output length of the .historical_forecast() applied on `series`.
      It is defined by the parameter `start` and the series’ length.
  
      Parameters
      ----------
      series
          The series given to the .historical_forecast()
      start
          Parameter of the .historical_forecast(): first point of time at which a prediction is computed
          for a future time.
      """
      # biggest window of the anomaly_model scorers
      max_window = max(scorer.window for scorer in self.scorers)
  
      for s in series:
          max_possible_window = (
              len(s.drop_before(s.get_timestamp_at_point(start))) + 1
          )
          raise_if_not(
              max_window <= max_possible_window,
              f"Window size {max_window} is greater than the targeted series length {max_possible_window},"
              + f" must be lower or equal. Reduce window size, or reduce start value (start: {start}).",
          )
  
file_path: darts/darts/ad/anomaly_model/forecasting_am.py
imports: import inspect
  from typing import Dict, Optional, Sequence, Union
  import pandas
  from darts.ad.anomaly_model.anomaly_model import AnomalyModel
  from darts.ad.scorers.scorers import AnomalyScorer
  from darts.ad.utils import _assert_same_length, _assert_timeseries, _to_list
  from darts.logging import get_logger, raise_if_not
  from darts.models.forecasting.forecasting_model import ForecastingModel
  from darts.timeseries import TimeSeries
label_desc: Use image node_id 6 for calling the ForecastingAnomalyModel obj's underlying member method code with example usage: obj._check_window_size(series, start) without return types