code: def testShape(self, constructor):
      batch_size = 2
      hidden_size = 4
      input_size = 3
      inputs = tf.random.uniform([batch_size, input_size])
      rnn = constructor(hidden_size)
      prev_state = rnn.initial_state(batch_size=batch_size)
      output, next_state = rnn(inputs, prev_state)
  
      tree.map_structure(
          lambda t1, t2: self.assertEqual(t1.shape, t2.shape),
          prev_state,
          next_state,
      )
      self.assertShapeEqual(np.zeros([batch_size, hidden_size]), output)
  
file_path: sonnet/sonnet/src/nets/dnc/control_test.py
imports: from absl.testing import parameterized
  import numpy
  from sonnet.src import recurrent
  from sonnet.src import test_utils
  from sonnet.src.nets.dnc import control
  import tensorflow
  import tree
label_desc: Use image node_id 1 for calling the CoreTest obj's underlying member method code with example usage: obj.testShape(constructor) without return types