class_docstr: Computes and stores the average and current value
class_docstr_tok: ["Computes","and","stores","the","average","and","current","value"]
code: def update(self, val, n=1):
      if val is not None:
          self.val = val
          if n > 0:
              self.sum = type_as(self.sum, val) + (val * n)
              self.count = type_as(self.count, n) + n
  
imports: import bisect
  import time
  from collections import OrderedDict
  from typing import Dict, Optional
label_desc: Use image node_id 3 for calling the AverageMeter obj's underlying member method code with example usage: obj.update(val, n) without return types