code: def test_revert():
      for _ in range(5):
          X = [random.random() for _ in range(20)]
  
          v1 = stats.Var()
          v2 = stats.Var()
  
          for x in X[:10]:
              v1.update(x)
              v2.update(x)
  
          for x in X[10:]:
              v2.update(x)
          for x in X[10:]:
              v2.revert(x)
  
          assert math.isclose(v1.get(), v2.get())
  
imports: from __future__ import annotations
  import math
  import random
  from river import stats
label_desc: Use image node_id 2 for calling a global function with example usage: test_revert() without return types