code: def _entropy(error_histogram):
      """
      Helper function to calculate the entropy of the given error histogram.
  
      Parameters
      ----------
      error_histogram : numpy array
          Error histogram.
  
      Returns
      -------
      entropy : float
          Entropy of the error histogram.
  
      """
      # copy the error_histogram, because it must not be altered
      histogram = np.copy(error_histogram).astype(float)
      # normalize the histogram
      histogram /= np.sum(histogram)
      # set all 0 values to 1 to make entropy calculation well-behaved
      histogram[histogram == 0] = 1.0
      # calculate entropy
      return -np.sum(histogram * np.log2(histogram))
  
imports: from __future__ import absolute_import, division, print_function
  import warnings
  from functools import wraps
  import numpy
  from .None import MeanEvaluation, calc_absolute_errors, calc_errors, evaluation_io, find_closest_matches
  from .onsets import OnsetEvaluation
label_desc: Use image node_id 15 for calling a global function with example usage: _entropy(error_histogram) and returns: unknown