code: def discrete_entropy(a: np.array, x: np.array, **kwargs) -> float:
      """
      Calculate discrete entropy of explanations with n_bins
      equidistant spaced bins of a single array.
  
      Parameters
      ----------
      a: np.ndarray
          Array to calculate entropy on.
      x: np.ndarray
          Array to compute shape.
      kwargs: optional
          Keyword arguments.
  
          n_bins: int
              Number of bins. default is 100.
  
      Returns
      -------
      float:
          Discrete Entropy.
      """
  
      n_bins = kwargs.get("n_bins", 100)
  
      histogram, bins = np.histogram(a, bins=n_bins)
  
      return scipy.stats.entropy(pk=histogram)
  
imports: import scipy
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: discrete_entropy(a, x) and returns: scipy