class_docstr: A mutable class that allows us to aggregate values and report mean/stddev.
class_docstr_tok: ["A","mutable","class","that","allows","us","to","aggregate","values","and","report","mean\/stddev","."]
code: def _update_variance(self):
      self._update_mean()
      if self.mean is None:
          return None
      pvariance = self.sum_squared / self.count - self.mean**2
      self.variance = 0 if pvariance < 0 else pvariance
  
file_path: H2O/h2o_hf/helm/src/helm/benchmark/metrics/statistic.py
imports: from dataclasses import dataclass, replace
  import math
  from typing import Dict, Optional
  from .metric_name import MetricName
label_desc: Use image node_id 6 for calling the Stat obj's underlying member method code with example usage: obj._update_variance() and returns: None