code: def add(self, value) -> "RunningAverage":
      if not math.isnan(value) and not math.isinf(value):
          if self._count == 0:
              self._average = 0.0
          self._count += 1
          self._average = (
              self._average
              + (float(value) - self._average) / self._count
          )
      return self
  
imports: import math
  from collections import OrderedDict
  from typing import Sequence, Union
  import numpy
  import torch
label_desc: Use image node_id 2 for calling the RunningAverage obj's underlying member method code with example usage: obj.add(value) and returns: self