code: def _estimate_num_steps(start_time, end_time, freq):
      """Estimates the number of steps between the given times at the given freq."""
      # Unfortunately `(end_time - start_time) / freq` doesn't work in general,
      # because some frequencies (e.g., MonthEnd) don't correspond to a fixed length
      # of time. Instead, we use a 'typical' length estimated by averaging over a
      # small number of steps. This recovers the exact calculation when `freq` does
      # have a fixed length (e.g., is measured in seconds, minutes, etc.).
      timedelta = ((start_time + 10 * freq) - start_time) / 10.0
      return (end_time - start_time) / timedelta
  
file_path: probability/tensorflow_probability/python/sts/regularization.py
imports: import collections
  import itertools
  import math
  import warnings
  import numpy
label_desc: Use image node_id 5 for calling a global function with example usage: _estimate_num_steps(start_time, end_time, freq) and returns: unknown