code: def test_output_spec(self):
      dtype = tf.float32 if self.primary_device == "TPU" else tf.float16
      inputs = {"foo": [tf.ones([], dtype), None]}
      output_spec = build.build(lambda x: x, inputs)
      self.assertEqual(
          output_spec, {"foo": [tf.TensorSpec([], dtype), None]}
      )
  
file_path: sonnet/sonnet/src/build_test.py
imports: from sonnet.src import build
  from sonnet.src import test_utils
  import tensorflow
label_desc: Use image node_id 2 for calling the BuildTest obj's underlying member method code with example usage: obj.test_output_spec() without return types