code: def test_build_without_batch(self, module_fn, input_shape, dtype):
      # For Keras test that building with unknown batch dim is supported.
      layer = LayerAdapter(module=module_fn(), dtype=dtype)
      layer.build((None,) + input_shape[1:])
  
      # For Sonnet just call with the example input.
      mod = module_fn()
      mod(tf.ones(input_shape, dtype))
  
      # Some modules (e.g. Sequential) are parameter-less.
      snt.allow_empty_variables(mod)
  
      # Test that module variables look the same.
      by_name = lambda c: sorted(c, key=lambda v: v.name)
      abstract = lambda v: (v.name, v.shape, v.dtype)
      for collection in ("variables", "trainable_variables"):
          for m, l in zip(
              by_name(getattr(mod, collection)),
              by_name(getattr(layer, collection)),
          ):
              self.assertEqual(abstract(m), abstract(l))
  
imports: from absl.testing import parameterized
  import sonnet
  from sonnet.src import test_utils
  from sonnet.src.conformance import descriptors
  import tensorflow
  import tree
label_desc: Use image node_id 1 for calling the KerasTest obj's underlying member method code with example usage: obj.test_build_without_batch(module_fn, input_shape, dtype) without return types