code: def run_test(self, data):
      vals = data["vals"]
      avg = data["avg"]
  
      counts = data.get("counts", None)
      if (
          counts is not None
          and not isinstance(counts, list)
          and isinstance(vals, list)
      ):
          counts = [counts] * len(vals)
  
      avg_meter = CumulativeAverage()
      for i in range(len(vals)):
          if counts is not None:
              avg_meter.append(vals[i], counts[i])
          else:
              avg_meter.append(vals[i])
  
      np.testing.assert_equal(avg_meter.aggregate(), avg)
  
file_path: MONAI/tests/test_cumulative_average.py
imports: from __future__ import annotations
  import unittest
  import numpy
  import torch
  from parameterized import parameterized
  from monai.metrics import CumulativeAverage
label_desc: Use image node_id 2 for calling the TestAverageMeter obj's underlying member method code with example usage: obj.run_test(data) without return types