code: def test_check_duplicates(self):
      err = "Duplicate array found"
      a = {"a": {"b": jnp.array([0.0, 0.1], dtype=jnp.float32)}}
      b = {"a": {"b": jnp.array([0.0, 0.1], dtype=jnp.bfloat16)}}
      c = {"a": {"b": jnp.array([0.0, 0.1, 0.2], dtype=jnp.float32)}}
      d = {"a": {"b": "foo"}}
  
      with self.subTest("dtype_mismatch"):
          with self.assertRaisesRegex(
              ValueError, rf"{err}.*f32\[2\] vs bf16\[2\]"
          ):
              filtering.merge(a, b, check_duplicates=True)
  
      with self.subTest("shape_mismatch"):
          with self.assertRaisesRegex(
              ValueError, rf"{err}.*f32\[2\] vs f32\[3\]"
          ):
              filtering.merge(a, c, check_duplicates=True)
  
      with self.subTest("multiple_mismatch"):
          with self.assertRaisesRegex(
              ValueError, rf"{err}.*f32\[2\] vs bf16\[2\]"
          ):
              filtering.merge(a, b, c, check_duplicates=True)
  
      with self.subTest("object_mismatch"):
          with self.assertRaisesRegex(
              ValueError, rf"{err}.*f32\[2\] vs 'foo'"
          ):
              filtering.merge(a, d, check_duplicates=True)
  
imports: import collections
  from collections.abc import Sequence
  import itertools
  import re
  import types
  from typing import Any, Callable
  from absl.testing import absltest
  from absl.testing import parameterized
  from haiku._src import basic
  from haiku._src import data_structures
  from haiku._src import filtering
  from haiku._src import transform
  import jax
  import jax.numpy
label_desc: Use image node_id 15 for calling the FilteringTest obj's underlying member method code with example usage: obj.test_check_duplicates() without return types