code: def freq_to_seconds(freq):
      """Converts time series DateOffset frequency to seconds."""
      if not freq:
          return None
      if not is_fixed_duration(freq):
          return None
  
      freq_secs = 0.0
      for kwds_unit, kwds_value in freq.kwds.items():
          switch_to_seconds = {
              "weeks": kwds_value * 60 * 60 * 24 * 7,
              "days": kwds_value * 60 * 60 * 24,
              "hours": kwds_value * 60 * 60,
              "minutes": kwds_value * 60,
              "seconds": kwds_value,
          }
          freq_secs += switch_to_seconds[kwds_unit]
      return freq_secs
  
file_path: probability/tensorflow_probability/python/sts/internal/seasonality_util.py
imports: import collections
  import enum
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import prefer_static
label_desc: Use image node_id 5 for calling a global function with example usage: freq_to_seconds(freq) and returns: freq_secs, None, None