code: def testCreateAndCall(self):
      net = sequential.Sequential(
          [
              nest_map.NestMap(
                  {
                      "inp1": tf.keras.layers.Dense(8),
                      "inp2": sequential.Sequential(
                          [
                              tf.keras.layers.Conv2D(2, 3),
                              # Convert 3 inner dimensions to [8] for RNN.
                              inner_reshape.InnerReshape(
                                  [None] * 3, [8]
                              ),
                          ]
                      ),
                      "inp3": tf.keras.layers.LSTM(
                          8, return_state=True, return_sequences=True
                      ),
                  }
              ),
              nest_map.NestFlatten(),
              tf.keras.layers.Add(),
          ]
      )
      self.assertEqual(
          net.state_spec,
          (
              {
                  "inp1": (),
                  "inp2": (),
                  "inp3": (
                      2
                      * (tf.TensorSpec(shape=(8,), dtype=tf.float32),),
                  ),
              },
          ),
      )
      output_spec = net.create_variables(
          {
              "inp1": tf.TensorSpec(shape=(3,), dtype=tf.float32),
              "inp2": tf.TensorSpec(
                  shape=(
                      4,
                      4,
                      2,
                  ),
                  dtype=tf.float32,
              ),
              "inp3": tf.TensorSpec(shape=(3,), dtype=tf.float32),
          }
      )
      self.assertEqual(
          output_spec, tf.TensorSpec(shape=(8,), dtype=tf.float32)
      )
  
      inputs = {
          "inp1": tf.ones((8, 10, 3), dtype=tf.float32),
          "inp2": tf.ones((8, 10, 4, 4, 2), dtype=tf.float32),
          "inp3": tf.ones((8, 10, 3), dtype=tf.float32),
      }
      output, next_state = net(inputs)
      self.assertEqual(output.shape, tf.TensorShape([8, 10, 8]))
      self.assertEqual(
          tf.nest.map_structure(lambda t: t.shape, next_state),
          (
              {
                  "inp1": (),
                  "inp2": (),
                  "inp3": (2 * (tf.TensorShape([8, 8]),),),
              },
          ),
      )
  
      # Test passing in a state.
      output, next_state = net(inputs, next_state)
      self.assertEqual(output.shape, tf.TensorShape([8, 10, 8]))
      self.assertEqual(
          tf.nest.map_structure(lambda t: t.shape, next_state),
          (
              {
                  "inp1": (),
                  "inp2": (),
                  "inp3": (2 * (tf.TensorShape([8, 8]),),),
              },
          ),
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  from absl import flags
  import tensorflow.compat.v2
  from tf_agents.keras_layers import inner_reshape
  from tf_agents.networks import nest_map
  from tf_agents.networks import sequential
  from tf_agents.policies import policy_saver
  from tf_agents.policies import tf_policy
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import policy_step
  from tf_agents.trajectories import time_step
  from tf_agents.utils import common
  from tf_agents.utils import nest_utils
  from tf_agents.utils import test_utils
label_desc: Use image node_id 2 for calling the NestMapTest obj's underlying member method code with example usage: obj.testCreateAndCall() without return types