code: def _raise_error_for_duplicated_keys(
      example1, example2, example_specs
  ):
      """Log information about the examples and raise an AssertionError."""
      msg = "Two examples share the same hashed key!"
      logging.error(msg)
      parser = example_parser.ExampleParser(example_specs)
      ex1 = parser.parse_example(example1)
      ex2 = parser.parse_example(example2)
      logging.error("1st example: %s", ex1)
      logging.error("2nd example: %s", ex2)
      raise AssertionError(
          msg + " See logs above to view the examples."
      )
  
imports: import dataclasses
  import functools
  import itertools
  import json
  import os
  from typing import Any, Iterable, List, Optional, Tuple
  from absl import logging
  from etils import epath
  from tensorflow_datasets.core import example_parser
  from tensorflow_datasets.core import example_serializer
  from tensorflow_datasets.core import file_adapters
  from tensorflow_datasets.core import hashing
  from tensorflow_datasets.core import lazy_imports_lib
  from tensorflow_datasets.core import naming
  from tensorflow_datasets.core import shuffle
  from tensorflow_datasets.core import utils
  from tensorflow_datasets.core.utils import file_utils
  from tensorflow_datasets.core.utils import shard_utils
  from tensorflow_datasets.core.utils import type_utils
  from tensorflow_datasets.core.utils.lazy_imports_utils import apache_beam
label_desc: Use image node_id 1 for calling a global function with example usage: _raise_error_for_duplicated_keys(example1, example2, example_specs) without return types