code: def test_covariance_update_shuffled(ddof):
      C1 = covariance.EmpiricalCovariance(ddof=ddof)
      C2 = covariance.EmpiricalCovariance(ddof=ddof)
  
      X = np.random.random((100, 5))
  
      for x, _ in stream.iter_array(X):
          C1.update(x)
          C2.update(
              {i: x[i] for i in random.sample(list(x.keys()), k=len(x))}
          )
  
      for i, j in C1._cov:
          assert math.isclose(C1[i, j].get(), C2[i, j].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 2 for calling a global function with example usage: test_covariance_update_shuffled(ddof) without return types