docs: def histogram(values, num_bins, bounds, normalized=True, plot=False, color='b'):
      """Generate a histogram plot.
  
      Parameters
      ----------
      values : :obj:`numpy.ndarray`
          An array of values to put in the histogram.
  
      num_bins : int
          The number equal-width bins in the histogram.
  
      bounds : :obj:`tuple` of float
          Two floats - a min and a max - that define the lower and upper
          ranges of the histogram, respectively.
  
      normalized : bool
          If True, the bins will show the percentage of elements they contain
          rather than raw counts.
  
      plot : bool
          If True, this function uses pyplot to plot the histogram.
  
      color : :obj:`str`
          The color identifier for the plotted bins.
  
      Returns
      -------
      :obj:`tuple of `:obj:`numpy.ndarray`
          The values of the histogram and the bin edges as ndarrays.
      """
      hist, bins = np.histogram(values, bins=num_bins, range=bounds)
      width = (bins[1] - bins[0])
      if normalized:
          if np.sum(hist) > 0:
              hist = hist.astype(np.float32) / np.sum(hist)
      if plot:
          import matplotlib.pyplot as plt
          plt.bar(bins[:-1], hist, width=width, color=color)    
      return hist, bins