code: def test_single(self):
      c = Cumulative()
      c.extend([2, 3])
      c.append(1)
      assert_allclose(c.get_buffer(), torch.tensor([2, 3, 1]))
  
file_path: MONAI/tests/test_cumulative.py
imports: from __future__ import annotations
  import unittest
  import torch
  from monai.metrics import Cumulative
  from tests.utils import assert_allclose
label_desc: Use image node_id 1 for calling the TestCumulative obj's underlying member method code with example usage: obj.test_single() without return types