docstr: Converts a frequency to number of days required by Facebook Prophet
  
  Parameters
  ----------
  freq
      frequency string of the underlying TimeSeries's time index (pd.DateTimeIndex.freq_str)
docstr_tok: ["Converts","a","frequency","to","number","of","days","required","by","Facebook","Prophet","Parameters","--","--","--","--","--","freq","frequency","string","of","the","underlying","TimeSeries","'s","time","index","(","pd.DateTimeIndex.freq_str",")"]
code: def _freq_to_days(freq: str) -> float:
      """Converts a frequency to number of days required by Facebook Prophet
  
      Parameters
      ----------
      freq
          frequency string of the underlying TimeSeries's time index (pd.DateTimeIndex.freq_str)
      """
  
      # this regex extracts all digits from `freq`: exp: '30S' -> 30
      freq_times = re.findall(r"\d+", freq)
      freq_times = 1 if not freq_times else int(freq_times[0])
  
      # this regex extracts all characters and '-' from `freq` and then extracts left string from '-'
      # exp: 'W-SUN' -> 'W', '30S' -> 'S'
      freq = "".join(re.split("[^a-zA-Z-]*", freq)).split("-")[0]
  
      seconds_per_day = 86400
      if freq in ["A", "BA", "Y", "BY", "RE"] or freq.startswith(
          ("A", "BA", "Y", "BY", "RE")
      ):  # year
          days = 365.25
      elif freq in ["Q", "BQ", "REQ"] or freq.startswith(
          ("Q", "BQ", "REQ")
      ):  # quarter
          days = 3 * 30.4375
      elif freq in ["M", "BM", "CBM", "SM"] or freq.startswith(
          ("M", "BM", "BS", "CBM", "SM")
      ):  # month
          days = 30.4375
      elif freq in ["W"]:  # week
          days = 7.0
      elif freq in ["B", "C"]:  # business day
          days = 1 * 7 / 5
      elif freq in ["D"]:  # day
          days = 1.0
      elif freq in ["H", "BH", "CBH"]:  # hour
          days = 1 / 24
      elif freq in ["T", "min"]:  # minute
          days = 1 / (24 * 60)
      elif freq in ["S"]:  # second
          days = 1 / seconds_per_day
      elif freq in ["L", "ms"]:  # millisecond
          days = 1 / (seconds_per_day * 10**3)
      elif freq in ["U", "us"]:  # microsecond
          days = 1 / (seconds_per_day * 10**6)
      elif freq in ["N"]:  # nanosecond
          days = 1 / (seconds_per_day * 10**9)
      else:
          raise ValueError(
              "freq {} not understood. Please report if you think this is in error.".format(
                  freq
              )
          )
      return freq_times * days
  
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 14 for calling the Prophet obj's underlying member method code with example usage: obj._freq_to_days(freq) and returns: unknown