docs: def mean(self) -> Optional[float]:
          """Statistical mean of all values entered into histogram.
  
          This number is precise, because we keep the necessary data
          separate from bin contents.
          """
          if self._stats:    # TODO: should be true always?
              if self.total > 0:
                  return self._stats["sum"] / self.total
              else:
                  return np.nan
          else:
              return None