code: def test_flatten_inputs_to_1d_tensor_w_time_axis(self):
      # B=2; T=1
      check(
          flatten_np(
              self.struct_w_time_axis,
              spaces_struct=self.spaces,
              time_axis=True,
          ),
          np.array(
              [
                  [
                      [
                          0.0,
                          1.0,
                          0.0,
                          0.0,
                          1.0,
                          2.0,
                          3.0,
                          8.0,
                          7.0,
                          6.0,
                          0.0,
                          1.0,
                          0.0,
                          0.0,
                          0.0,
                          0.0,
                          1.0,
                          0.0,
                          0.0,
                          0.0,
                          1.0,
                      ]
                  ],
                  [
                      [
                          0.0,
                          0.0,
                          0.0,
                          1.0,
                          4.0,
                          5.0,
                          6.0,
                          5.0,
                          4.0,
                          3.0,
                          0.0,
                          0.0,
                          0.0,
                          1.0,
                          0.0,
                          0.0,
                          0.0,
                          0.0,
                          0.0,
                          1.0,
                          2.0,
                      ]
                  ],
              ]
          ),
      )
  
      struct_tf = tree.map_structure(
          lambda s: tf.convert_to_tensor(s), self.struct_w_time_axis
      )
      check(
          flatten_tf(
              struct_tf, spaces_struct=self.spaces, time_axis=True
          ),
          np.array(
              [
                  [
                      [
                          0.0,
                          1.0,
                          0.0,
                          0.0,
                          1.0,
                          2.0,
                          3.0,
                          8.0,
                          7.0,
                          6.0,
                          0.0,
                          1.0,
                          0.0,
                          0.0,
                          0.0,
                          0.0,
                          1.0,
                          0.0,
                          0.0,
                          0.0,
                          1.0,
                      ]
                  ],
                  [
                      [
                          0.0,
                          0.0,
                          0.0,
                          1.0,
                          4.0,
                          5.0,
                          6.0,
                          5.0,
                          4.0,
                          3.0,
                          0.0,
                          0.0,
                          0.0,
                          1.0,
                          0.0,
                          0.0,
                          0.0,
                          0.0,
                          0.0,
                          1.0,
                          2.0,
                      ]
                  ],
              ]
          ),
      )
  
      struct_torch = tree.map_structure(
          lambda s: torch.from_numpy(s), self.struct_w_time_axis
      )
      check(
          flatten_torch(
              struct_torch, spaces_struct=self.spaces, time_axis=True
          ),
          np.array(
              [
                  [
                      [
                          0.0,
                          1.0,
                          0.0,
                          0.0,
                          1.0,
                          2.0,
                          3.0,
                          8.0,
                          7.0,
                          6.0,
                          0.0,
                          1.0,
                          0.0,
                          0.0,
                          0.0,
                          0.0,
                          1.0,
                          0.0,
                          0.0,
                          0.0,
                          1.0,
                      ]
                  ],
                  [
                      [
                          0.0,
                          0.0,
                          0.0,
                          1.0,
                          4.0,
                          5.0,
                          6.0,
                          5.0,
                          4.0,
                          3.0,
                          0.0,
                          0.0,
                          0.0,
                          1.0,
                          0.0,
                          0.0,
                          0.0,
                          0.0,
                          0.0,
                          1.0,
                          2.0,
                      ]
                  ],
              ]
          ),
      )
  
imports: import gymnasium
  import numpy
  import tree
  import unittest
  import ray
  from ray.rllib.utils.framework import try_import_tf, try_import_torch
  from ray.rllib.utils.numpy import flatten_inputs_to_1d_tensor
  from ray.rllib.utils.numpy import make_action_immutable
  from ray.rllib.utils.test_utils import check
  from ray.rllib.utils.tf_utils import flatten_inputs_to_1d_tensor, l2_loss, one_hot
  from ray.rllib.utils.torch_utils import flatten_inputs_to_1d_tensor, l2_loss, one_hot
label_desc: Use image node_id 5 for calling the TestUtils obj's underlying member method code with example usage: obj.test_flatten_inputs_to_1d_tensor_w_time_axis() without return types