code: def test_dedup():
      a = Categorical([1, 2, 3], label="a")
      b = Categorical([1, 2, 3], label="a")
      assert a.equals(b)
  
      assert len(_dedup_labeled_mutables([a, b])) == 1
  
      b = Categorical([1, 2, 3, 4], label="a")
      with pytest.raises(ValueError, match="are different"):
          _dedup_labeled_mutables([a, b])
  
      b = MyCategorical([1, 2, 3], label="a")
      with pytest.raises(ValueError, match="are different"):
          _dedup_labeled_mutables([a, b])
  
      a = Numerical(0, 1, log_distributed=True, label="a")
      b = Numerical(0, 1, log_distributed=True, label="a")
  
      assert len(_dedup_labeled_mutables([a, b])) == 1
      assert not a.equals(
          Numerical(0, 1, log_distributed=False, label="a")
      )
      assert not a.equals(Numerical(mu=0, sigma=1, label="a"))
  
      a = Numerical(0, 1, label="a", default=0.5)
      b = Numerical(0, 1, label="a", default=0.3)
      assert not a.equals(b)
  
imports: import math
  from collections import Counter
  import numpy
  import pytest
  from nni.mutable import *
  from nni.mutable.mutable import _dedup_labeled_mutables, _mutable_equal
label_desc: Use image node_id 9 for calling a global function with example usage: test_dedup() without return types