docstr: Tests, SampleBatches.concat_samples() max_seq_len.
docstr_tok: ["Tests",",","SampleBatches.concat_samples","(",")","max_seq_len","."]
code: def test_concat_max_seq_len(self):
      """Tests, SampleBatches.concat_samples() max_seq_len."""
      s1 = SampleBatch(
          {
              "a": np.array([1, 2, 3]),
              "b": {"c": np.array([4, 5, 6])},
              SampleBatch.SEQ_LENS: [1, 2],
          }
      )
      s2 = SampleBatch(
          {
              "a": np.array([2, 3, 4]),
              "b": {"c": np.array([5, 6, 7])},
              SampleBatch.SEQ_LENS: [3],
          }
      )
  
      s3 = SampleBatch(
          {
              "a": np.array([2, 3, 4]),
              "b": {"c": np.array([5, 6, 7])},
          }
      )
  
      concatd = concat_samples([s1, s2])
      check(concatd.max_seq_len, s2.max_seq_len)
  
      with self.assertRaises(ValueError):
          concat_samples([s1, s2, s3])
  
imports: import copy
  import functools
  import os
  import unittest
  import numpy
  import torch
  import tree
  import ray
  from ray.rllib.models.repeated_values import RepeatedValues
  from ray.rllib.policy.sample_batch import SampleBatch, attempt_count_timesteps, concat_samples
  from ray.rllib.utils.compression import is_compressed
  from ray.rllib.utils.framework import try_import_torch
  from ray.rllib.utils.test_utils import check
  from ray.rllib.utils.torch_utils import convert_to_torch_tensor
label_desc: Use image node_id 7 for calling the TestSampleBatch obj's underlying member method code with example usage: obj.test_concat_max_seq_len() without return types