code: def cumdiff(yin):
      """compute the cumulative mean normalized difference"""
      W = len(yin)
      yin[0] = 1.0
      cumsum = 0.0
      for tau in range(1, W):
          cumsum += yin[tau]
          if cumsum != 0:
              yin[tau] *= tau / cumsum
          else:
              yin[tau] = 1
      return yin
  
file_path: aubio/python/demos/demo_yin_compare.py
imports: import sys
  import numpy
  import matplotlib.pyplot
label_desc: Use image node_id 5 for calling a global function with example usage: cumdiff(yin) and returns: yin