code: def test_unstack_nested_actions(self):
      num_envs = 2
      env = self._make_parallel_py_environment(num_envs=num_envs)
      action_spec = env.action_spec()
      rng = np.random.RandomState()
      batched_action = np.array(
          [
              array_spec.sample_bounded_spec(action_spec, rng)
              for _ in range(num_envs)
          ]
      )
  
      # Test that actions are correctly unstacked when nested in namedtuple.
      class NestedAction(
          collections.namedtuple(
              "NestedAction", ["action", "other_var"]
          )
      ):
          pass
  
      nested_action = NestedAction(
          action=batched_action, other_var=np.array([13.0] * num_envs)
      )
      unstacked_actions = env._unstack_actions(nested_action)
      for nested_action in unstacked_actions:
          self.assertAllEqual(
              action_spec.shape, nested_action.action.shape
          )
          self.assertEqual(13.0, nested_action.other_var)
      env.close()
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import functools
  import time
  import numpy
  import tensorflow
  from tf_agents.environments import parallel_py_environment
  from tf_agents.environments import py_environment
  from tf_agents.environments import random_py_environment
  from tf_agents.specs import array_spec
  from tf_agents.system import system_multiprocessing
  from tf_agents.trajectories import time_step
label_desc: Use image node_id 10 for calling the ParallelPyEnvironmentTest obj's underlying member method code with example usage: obj.test_unstack_nested_actions() without return types