docs: def get_err_data(histogram: HistogramBase, density: bool = False, cumulative: bool = False, flatten: bool = False) -> np.ndarray:
      """Get histogram error data based on plotting parameters.
  
      Parameters
      ----------
      density : Whether to divide bin contents by bin size
      cumulative : Whether to return cumulative sums instead of individual
      flatten : Whether to flatten multidimensional bins
      """
      if cumulative:
          raise RuntimeError("Error bars not supported for cumulative plots.")
      if density:
          data = histogram.errors / histogram.bin_sizes
      else:
          data = histogram.errors
      if flatten:
          data = data.flatten()
      return data