class_docstr: Computes and stores the average and current value.
  
  Example:
      >>> stats = AverageMeter()
      >>> acc1 = torch.tensor(0.99) # coming from K.metrics.accuracy
      >>> stats.update(acc1, n=1)  # where n is batch size usually
      >>> round(stats.avg, 2)
      0.99
code: def avg(self) -> float:
      if isinstance(self._avg, Tensor):
          return float(self._avg.item())
      return self._avg
  
imports: from typing import Union
  from kornia.core import Tensor
label_desc: Use image node_id 4 for calling the AverageMeter obj's underlying member method code with example usage: obj.avg() and returns: self, float