code: def test_duplicate_key(self):
      shuffler = shuffle.Shuffler(self.get_temp_dir(), "split1")
      shuffler.add(1, b"a")
      shuffler.add(2, b"b")
      shuffler.add(1, b"c")
      iterator = iter(shuffler)
      self.assertEqual(
          next(iterator), (86269847664267119453139349052967691808, b"a")
      )
      with self.assertRaises(shuffle.DuplicatedKeysError):
          next(iterator)
  
imports: import collections
  import contextlib
  import logging
  import resource
  import tempfile
  from absl.testing.absltest import mock
  import pytest
  from tensorflow_datasets import testing
  from tensorflow_datasets.core import shuffle
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
label_desc: Use image node_id 6 for calling the ShuffleTest obj's underlying member method code with example usage: obj.test_duplicate_key() without return types