docstr: Test pad_batch_to_sequences_of_same_size when dynamic_max = False
docstr_tok: ["Test","pad_batch_to_sequences_of_same_size","when","dynamic_max","=","False"]
code: def test_pad_batch_fixed_max(self):
      """Test pad_batch_to_sequences_of_same_size when dynamic_max = False"""
      view_requirements = {
          "state_in_0": ViewRequirement(
              "state_out_0",
              shift="-3:-1",
              used_for_training=False,
              used_for_compute_actions=True,
              batch_repeat_value=1,
          )
      }
      max_seq_len = 20
      num_seqs = np.random.randint(1, 20)
      seq_lens = np.random.randint(1, max_seq_len, size=(num_seqs))
      sum_seq_lens = np.sum(seq_lens)
      s1 = SampleBatch(
          {
              "a": np.arange(sum_seq_lens),
              "b": np.arange(sum_seq_lens),
              "seq_lens": seq_lens,
              "state_in_0": [[0]] * num_seqs,
          },
          _max_seq_len=max_seq_len,
      )
  
      pad_batch_to_sequences_of_same_size(
          s1,
          max_seq_len=max_seq_len,
          feature_keys=["a", "b"],
          view_requirements=view_requirements,
      )
      check(s1.max_seq_len, max_seq_len)
      check(s1["a"].shape[0], max_seq_len * num_seqs)
      check(s1["b"].shape[0], max_seq_len * num_seqs)
  
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 5 for calling the TestRNNSequencing obj's underlying member method code with example usage: obj.test_pad_batch_fixed_max() without return types