docs: def effective_sample_size(h):
      """
      Calculate the effective sample size for a histogram
      the same way as ROOT does.
      """
      sum = 0
      ew = 0
      w = 0
      for bin in h.bins(overflow=False):
          sum += bin.value
          ew = bin.error
          w += ew * ew
      esum = sum * sum / w
      return esum