code: def _information_gain(error_histogram):
      """
      Helper function to calculate the information gain of the given error
      histogram.
  
      Parameters
      ----------
      error_histogram : numpy array
          Error histogram.
  
      Returns
      -------
      information_gain : float
          Information gain.
  
      """
      # calculate the entropy of th error histogram
      if np.asarray(error_histogram).any():
          entropy = _entropy(error_histogram)
      else:
          # an empty error histogram has an entropy of 0
          entropy = 0.0
      # return information gain
      return np.log2(len(error_histogram)) - entropy
  
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 16 for calling a global function with example usage: _information_gain(error_histogram) and returns: unknown