code: def testActionsWithinRange(self):
      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.float32, 0, 3),
      ]
      net = actor_rnn_network.ActorRnnNetwork(
          observation_spec,
          action_spec,
          conv_layer_params=[(4, 2, 2)],
          input_fc_layer_params=(5,),
          output_fc_layer_params=(5,),
          lstm_size=(3,),
      )
  
      actions, _ = net(
          time_step.observation,
          time_step.step_type,
          net.get_initial_state(batch_size=1),
      )
      self.evaluate(tf.compat.v1.global_variables_initializer())
  
      for action, spec in zip(actions, action_spec):
          action_ = self.evaluate(action)
          self.assertTrue(np.all(action_ >= spec.minimum))
          self.assertTrue(np.all(action_ <= spec.maximum))
  
file_path: agents/tf_agents/agents/ddpg/actor_rnn_network_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import tensorflow
  from tf_agents.agents.ddpg import actor_rnn_network
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import time_step
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 2 for calling the ActorRnnNetworkTest obj's underlying member method code with example usage: obj.testActionsWithinRange() without return types