docstr: Test pad_batch where episodes are longer than max_seq_len. The long
  seq should be split into two smaller seqs that are less than max_seq_len
docstr_tok: ["Test","pad_batch","where","episodes","are","longer","than","max_seq_len",".","The","long","seq","should","be","split","into","two","smaller","seqs","that","are","less","than","max_seq_len"]
code: def test_chop_into_sequences_long_seq(self):
      """Test pad_batch where episodes are longer than max_seq_len. The long
      seq should be split into two smaller seqs that are less than max_seq_len
      """
      max_seq_len = 2
      # Input seq lens, corresponding to ep_ids, unroll_ids, etc.
      seq_lens = [2, 3, 1]  # noqa: F841
      ep_ids = [0, 0, 1, 1, 1, 2]
      unroll_ids = [2, 2, 3, 3, 3, 4]
      feats = [[1, 1, 2, 2, 2, 3]]
      # Input states, ie states[3] is the input state at
      # t = 3 and the output state at t = 2
      states = [[1, 2, 3, 4, 5, 6]]
      agent = [0, 0, 0, 0, 0, 0]
      f_pad, s_init, s_lens = chop_into_sequences(
          feature_columns=feats,
          state_columns=states,
          max_seq_len=max_seq_len,
          episode_ids=ep_ids,
          unroll_ids=unroll_ids,
          agent_indices=agent,
          dynamic_max=False,
          padding="zero",
      )
      expected_f_pad = [[1, 1, 2, 2, 2, 0, 3, 0]]
      expected_seq_lens = [2, 2, 1, 1]
      expected_states = [[1, 3, 5, 6]]
      check(f_pad, expected_f_pad)
      check(s_lens, expected_seq_lens)
      check(s_init, expected_states)
  
      # Try again with dynamic max
      f_pad, s_init, s_lens = chop_into_sequences(
          feature_columns=feats,
          state_columns=states,
          max_seq_len=max_seq_len,
          episode_ids=ep_ids,
          unroll_ids=unroll_ids,
          agent_indices=agent,
          dynamic_max=True,
      )
      check(f_pad, expected_f_pad)
      check(s_lens, expected_seq_lens)
      check(s_init, expected_states)
  
      # With padding="last"
      f_pad, s_init, s_lens = chop_into_sequences(
          feature_columns=feats,
          state_columns=states,
          max_seq_len=max_seq_len,
          episode_ids=ep_ids,
          unroll_ids=unroll_ids,
          agent_indices=agent,
          dynamic_max=False,
          padding="last",
      )
      expected_f_pad = [[1, 1, 2, 2, 2, 2, 3, 3]]
      check(f_pad, expected_f_pad)
      check(s_lens, expected_seq_lens)
      check(s_init, expected_states)
  
file_path: ray/python/ray/rllib/policy/tests/test_rnn_sequencing.py
imports: import unittest
  import numpy
  import ray
  from ray.rllib.policy.rnn_sequencing import pad_batch_to_sequences_of_same_size, add_time_dimension, chop_into_sequences
  from ray.rllib.policy.sample_batch import SampleBatch
  from ray.rllib.policy.view_requirement import ViewRequirement
  from ray.rllib.utils.framework import try_import_tf, try_import_torch
  from ray.rllib.utils.test_utils import check
label_desc: Use image node_id 3 for calling the TestRNNSequencing obj's underlying member method code with example usage: obj.test_chop_into_sequences_long_seq() without return types