code: def testBuilds(self, lstm_size, rnn_construction_fn):
      observation_spec = tensor_spec.BoundedTensorSpec(
          (8, 8, 3), tf.float32, 0, 1
      )
      time_step_spec = ts.time_step_spec(observation_spec)
      time_step = tensor_spec.sample_spec_nest(
          time_step_spec, outer_dims=(1,)
      )
  
      action_spec = [
          tensor_spec.BoundedTensorSpec((2,), tf.float32, 2, 3),
          tensor_spec.BoundedTensorSpec((3,), tf.int32, 0, 3),
      ]
  
      net = actor_distribution_rnn_network.ActorDistributionRnnNetwork(
          observation_spec,
          action_spec,
          conv_layer_params=[(4, 2, 2)],
          input_fc_layer_params=(5,),
          output_fc_layer_params=(5,),
          lstm_size=lstm_size,
          rnn_construction_fn=rnn_construction_fn,
          rnn_construction_kwargs={"lstm_size": 3},
      )
  
      action_distributions, network_state = net(
          time_step.observation,
          time_step.step_type,
          net.get_initial_state(batch_size=1),
      )
      self.evaluate(tf.compat.v1.global_variables_initializer())
      self.assertEqual(
          [1, 2], action_distributions[0].mode().shape.as_list()
      )
      self.assertEqual(
          [1, 3], action_distributions[1].mode().shape.as_list()
      )
  
      self.assertLen(net.variables, 14)
      # Conv Net Kernel
      self.assertEqual((2, 2, 3, 4), net.variables[0].shape)
      # Conv Net bias
      self.assertEqual((4,), net.variables[1].shape)
      # Fc Kernel
      self.assertEqual((64, 5), net.variables[2].shape)
      # Fc Bias
      self.assertEqual((5,), net.variables[3].shape)
      # LSTM Cell Kernel
      self.assertEqual((5, 12), net.variables[4].shape)
      # LSTM Cell Recurrent Kernel
      self.assertEqual((3, 12), net.variables[5].shape)
      # LSTM Cell Bias
      self.assertEqual((12,), net.variables[6].shape)
      # Fc Kernel
      self.assertEqual((3, 5), net.variables[7].shape)
      # Fc Bias
      self.assertEqual((5,), net.variables[8].shape)
      # Normal Projection Kernel
      self.assertEqual((5, 2), net.variables[9].shape)
      # Normal Projection Bias
      self.assertEqual((2,), net.variables[10].shape)
      # Normal Projection STD Bias layer
      self.assertEqual((2,), net.variables[11].shape)
      # Categorical Projection Kernel
      self.assertEqual((5, 12), net.variables[12].shape)
      # Categorical Projection Bias
      self.assertEqual((12,), net.variables[13].shape)
  
      # Assert LSTM cell is created.
      self.assertEqual((1, 3), network_state[0].shape)
      self.assertEqual((1, 3), network_state[1].shape)
  
file_path: agents/tf_agents/networks/actor_distribution_rnn_network_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import tensorflow
  from tf_agents.networks import actor_distribution_rnn_network
  from tf_agents.policies import actor_policy
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import time_step
label_desc: Use image node_id 2 for calling the ActorDistributionNetworkTest obj's underlying member method code with example usage: obj.testBuilds(lstm_size, rnn_construction_fn) without return types