code: def periods_per_year(frequency):
      """Counts number of steps that equal a year, if defined and 2 <= N <= 12."""
      # pylint: disable=unused-import,g-import-not-at-top
      import pandas as pd  # Defer import to avoid a package-level Pandas dep.
  
      # pylint: enable=unused-import,g-import-not-at-top
  
      if is_fixed_duration(frequency):
          return None  # No fixed duration divides both leap and non-leap years.
  
      start = pd.Timestamp("1900-01-01")
      # Align the start date with any constraints imposed by the frequency, e.g.,
      # `pd.offsets.MonthEnd()`.
      start = (start + frequency) - frequency
      end = start + pd.DateOffset(years=1)
      for num_steps in range(2, 13):
          if start + num_steps * frequency == end:
              return num_steps
      return None
  
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 6 for calling a global function with example usage: periods_per_year(frequency) and returns: None, None, num_steps