code: def test_dedup():
      deduper = DeduplicationHelper()
      assert deduper.dedup(1)
      assert deduper.dedup(2)
      assert not deduper.dedup(1)
  
      assert deduper.dedup({"a": 1, "b": {"c": 3, "d": [2, 3, 4]}})
      assert not deduper.dedup({"a": 1, "b": {"c": 3, "d": [2, 3, 4]}})
  
      deduper.remove({"a": 1, "b": {"c": 3, "d": [2, 3, 4]}})
      assert deduper.dedup({"a": 1, "b": {"c": 3, "d": [2, 3, 4]}})
  
      deduper.reset()
      assert deduper.dedup(1)
  
      deduper = DeduplicationHelper(True)
      assert deduper.dedup(1)
      with pytest.raises(DuplicationError):
          deduper.dedup(1)
  
imports: import pytest
  from nni.mutable import *
  from nni.nas.strategy.utils import *
label_desc: Use image node_id 1 for calling a global function with example usage: test_dedup() without return types