class_docstr: Maintains running average for scalar metrics
  
  Call .restart() to clear added values and to start a new round of averaging
docstr: add the current value to be further averaged
  
  Parameters
  ----------
  value : float or scalar Tensor
      the new value
docstr_tok: ["add","the","current","value","to","be","further","averaged","Parameters","--","--","--","--","--","value",":","float","or","scalar","Tensor","the","new","value"]
code: def update(self, value: Union[Tensor, float]) -> None:
      """
      add the current value to be further averaged
  
      Parameters
      ----------
      value : float or scalar Tensor
          the new value
      """
      if isinstance(value, Tensor):
          if value.ndim > 0:
              raise ValueError("A non-scalar tensor is provided.")
          value = value.item()
      self._cum_values += value
      self._count += 1
      self.cache = value
  
imports: from __future__ import annotations
  import time
  import warnings
  from abc import ABC, abstractmethod
  from typing import Optional, Union
  from torch import Tensor
  from ..engine.distributed import reduce_value
label_desc: Use image node_id 2 for calling the NumericalAverageMeter obj's underlying member method code with example usage: obj.update(value) without return types