code: def interval_histogram_comb(
      activations, alpha, min_tau=1, max_tau=None
  ):
      """
      Compute the interval histogram of the given (beat) activation function via
      a bank of resonating comb filters as in [1]_.
  
      Parameters
      ----------
      activations : numpy array
          Beat activation function.
      alpha : float or numpy array
          Scaling factor for the comb filter; if only a single value is given,
          the same scaling factor for all delays is assumed.
      min_tau : int, optional
          Minimal delay for the comb filter [frames].
      max_tau : int, optional
          Maximal delta for comb filter [frames].
  
      Returns
      -------
      histogram_bins : numpy array
          Bins of the tempo histogram.
      histogram_delays : numpy array
          Corresponding delays [frames].
  
      References
      ----------
      .. [1] Sebastian Böck, Florian Krebs and Gerhard Widmer,
             "Accurate Tempo Estimation based on Recurrent Neural Networks and
             Resonating Comb Filters",
             Proceedings of the 16th International Society for Music Information
             Retrieval Conference (ISMIR), 2015.
  
      """
      # import comb filter
      from madmom.audio.comb_filters import CombFilterbankProcessor
  
      # set the maximum delay
      if max_tau is None:
          max_tau = len(activations) - min_tau
      # get the range of taus
      taus = np.arange(min_tau, max_tau + 1)
      # create a comb filter bank instance
      cfb = CombFilterbankProcessor("backward", taus, alpha)
      if activations.ndim in (1, 2):
          # apply a bank of comb filters
          act = cfb.process(activations)
          # determine the tau with the highest value for each time step
          act_max = act == np.max(act, axis=-1)[..., np.newaxis]
          # sum up these maxima weighted by the activation value to yield the
          # histogram bin values
          histogram_bins = np.sum(act * act_max, axis=0)
      else:
          raise NotImplementedError(
              "too many dimensions for comb filter "
              "interval histogram calculation."
          )
      # return the histogram
      return histogram_bins, taus
  
imports: from __future__ import absolute_import, division, print_function
  import sys
  import warnings
  from operator import itemgetter
  import numpy
  from ..audio.signal import smooth
  from ..processors import BufferProcessor, OnlineProcessor
label_desc: Use image node_id 3 for calling a global function with example usage: interval_histogram_comb(activations, alpha, min_tau, max_tau) and returns: histogram_bins,  taus