code: def test_complex_dtype(self):
      if jax.local_devices()[0].platform == "tpu":
          self.skipTest("Complex dtype not supported by TPU")
      # This just makes sure we can call the initializers in accordance to the
      # API and get the right shapes and dtypes out.
      inits = [
          initializers.Constant(42.0 + 1j * 1729.0),
          initializers.RandomNormal(),
          initializers.RandomNormal(2.0),
          initializers.RandomNormal(2.0 - 3j),
          initializers.TruncatedNormal(),
          initializers.TruncatedNormal(2.0),
          initializers.TruncatedNormal(2.0, 1.0 - 1j),
          # Users are supposed to be able to use these.
          jnp.zeros,
          jnp.ones,
      ]
  
      shape = (5, 13, 17)
  
      dtype = jnp.complex64
      for init in inits:
          generated = init(shape, dtype)
          self.assertEqual(generated.shape, shape)
          self.assertEqual(generated.dtype, dtype)
  
imports: import itertools
  from absl.testing import absltest
  from absl.testing import parameterized
  from haiku._src import initializers
  from haiku._src import test_utils
  import jax
  from jax import config
  import jax.numpy
  import numpy
label_desc: Use image node_id 9 for calling the InitializersTest obj's underlying member method code with example usage: obj.test_complex_dtype() without return types