code: def test_nested(self):
      eps_ids = [1, 1, 1, 5, 5, 5, 5, 5]
      agent_ids = [1, 1, 1, 1, 1, 1, 1, 1]
      f = [
          {
              "a": np.array([1, 2, 3, 4, 13, 14, 15, 16]),
              "b": {"ba": np.array([5, 6, 7, 8, 9, 10, 11, 12])},
          }
      ]
      s = [[209, 208, 207, 109, 108, 107, 106, 105]]
  
      f_pad, s_init, seq_lens = chop_into_sequences(
          episode_ids=eps_ids,
          unroll_ids=np.ones_like(eps_ids),
          agent_indices=agent_ids,
          feature_columns=f,
          state_columns=s,
          max_seq_len=4,
          handle_nested_data=True,
      )
      check(
          f_pad,
          [
              [
                  [1, 2, 3, 0, 4, 13, 14, 15, 16, 0, 0, 0],
                  [5, 6, 7, 0, 8, 9, 10, 11, 12, 0, 0, 0],
              ]
          ],
      )
      self.assertEqual([s.tolist() for s in s_init], [[209, 109, 105]])
      self.assertEqual(seq_lens.tolist(), [3, 4, 1])
  
imports: import numpy
  import pickle
  import unittest
  import ray
  from ray.rllib.algorithms.ppo import PPOConfig
  from ray.rllib.examples.env.debug_counter_env import DebugCounterEnv
  from ray.rllib.examples.models.rnn_spy_model import RNNSpyModel
  from ray.rllib.models import ModelCatalog
  from ray.rllib.policy.rnn_sequencing import chop_into_sequences
  from ray.rllib.policy.sample_batch import SampleBatch
  from ray.rllib.utils.test_utils import check
  from ray.tune.registry import register_env
label_desc: Use image node_id 2 for calling the TestLSTMUtils obj's underlying member method code with example usage: obj.test_nested() without return types