code: def test_covariance_revert(ddof):
      X = np.random.random((100, 5))
      X1 = X[: len(X) // 2]
      X2 = X[len(X) // 2 :]
  
      C1 = covariance.EmpiricalCovariance(ddof=ddof)
      for x, _ in stream.iter_array(X1):
          C1.update(x)
  
      C2 = covariance.EmpiricalCovariance(ddof=ddof)
      for x, _ in stream.iter_array(X):
          C2.update(x)
      for x, _ in stream.iter_array(X2):
          C2.revert(x)
  
      for k in C1._cov:
          assert math.isclose(C1._cov[k].get(), C2._cov[k].get())
  
file_path: river/river/covariance/test_emp.py
imports: from __future__ import annotations
  import math
  import random
  import numpy
  import pandas
  import pytest
  from river import covariance, stream
label_desc: Use image node_id 1 for calling a global function with example usage: test_covariance_revert(ddof) without return types