code: def test_write_duplicated_keys(self):
      to_write = [(1, b"a"), (2, b"b"), (1, b"c")]
      with self.assertRaisesWithPredicateMatch(
          AssertionError, "Two examples share the same hashed key"
      ):
          shard_config = shard_utils.ShardConfig(num_shards=1)
          self._write(to_write=to_write, shard_config=shard_config)
  
imports: import json
  import os
  from typing import Optional
  from unittest import mock
  from etils import epath
  import tensorflow
  from tensorflow_datasets import testing
  from tensorflow_datasets.core import dataset_utils
  from tensorflow_datasets.core import example_parser
  from tensorflow_datasets.core import file_adapters
  from tensorflow_datasets.core import lazy_imports_lib
  from tensorflow_datasets.core import naming
  from tensorflow_datasets.core import writer
  from tensorflow_datasets.core.utils import shard_utils
  from tensorflow_datasets.core.writer import _ShardSpec
label_desc: Use image node_id 5 for calling the WriterTest obj's underlying member method code with example usage: obj.test_write_duplicated_keys() without return types