code: def __test_params(D1, D2):
      p1 = D1.get_params()["params"]
      r1 = p1.pop("rng", None)
  
      p2 = D2.get_params()["params"]
      r2 = p2.pop("rng", None)
  
      # Make sure that all parameters are preserved
      assert p1 == p2
  
      r1 = muda.base._get_rng(r1)
      r2 = muda.base._get_rng(r2)
      # Comparing random states is a pain
      if r1 is not None or r2 is not None:
          for v1, v2 in zip(r1.get_state(), r2.get_state()):
              if isinstance(v1, six.string_types):
                  assert v1 == v2
              else:
                  assert np.allclose(v1, v2)
  
imports: from copy import deepcopy
  import re
  import six
  import numpy
  import soundfile
  import jams
  import librosa
  import muda
  import pytest
  import scipy
  from contextlib import contextmanager
label_desc: Use image node_id 8 for calling a global function with example usage: __test_params(D1, D2) without return types