code: def testNestedNestWithNestedState(self):
      # layer structure: (., {'a': {'b': .}})
      net = nest_map.NestMap(
          (
              tf.keras.layers.Dense(7),
              {
                  "a": nest_map.NestMap(
                      {
                          "b": tf.keras.layers.LSTM(
                              8,
                              return_state=True,
                              return_sequences=True,
                          )
                      }
                  )
              },
          )
      )
      # TODO(b/177337002): remove the forced tuple wrapping the LSTM
      # state once we make a generic KerasWrapper network and clean up
      # Sequential and NestMap to use that instead of singleton Sequential.
      out, state = net(
          (tf.ones((1, 2)), {"a": {"b": tf.ones((1, 2))}}),
          network_state=(
              (),
              {"a": {"b": ((tf.ones((1, 8)), tf.ones((1, 8))),)}},
          ),
      )
      nest_utils.assert_matching_dtypes_and_inner_shapes(
          out,
          (
              tf.TensorSpec(dtype=tf.float32, shape=(7,)),
              {"a": {"b": tf.TensorSpec(dtype=tf.float32, shape=(8,))}},
          ),
          caller=self,
          tensors_name="out",
          specs_name="out_expected",
      )
      nest_utils.assert_matching_dtypes_and_inner_shapes(
          state,
          (
              (),
              {
                  "a": {
                      "b": (
                          (
                              tf.TensorSpec(
                                  dtype=tf.float32, shape=(8,)
                              ),
                              tf.TensorSpec(
                                  dtype=tf.float32, shape=(8,)
                              ),
                          ),
                      )
                  }
              },
          ),
          caller=self,
          tensors_name="state",
          specs_name="state_expected",
      )
  
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 4 for calling the NestMapTest obj's underlying member method code with example usage: obj.testNestedNestWithNestedState() without return types