code: def test_max_sequence_length(self, max_sequence_length):
      adder = adders.EpisodeAdder(self.client, max_sequence_length)
  
      first, steps = test_utils.make_trajectory(
          range(max_sequence_length + 1)
      )
      adder.add_first(first)
      for action, step in steps[:-1]:
          adder.add(action, step)
  
      # We should have max_sequence_length-1 timesteps that have been written,
      # where the -1 is due to the dangling observation (ie we have actually
      # seen max_sequence_length observations).
      self.assertEqual(self.num_items(), 0)
  
      # Adding one more step should raise an error.
      with self.assertRaises(ValueError):
          action, step = steps[-1]
          adder.add(action, step)
  
      # Since the last insert failed it should not affect the internal state.
      self.assertEqual(self.num_items(), 0)
  
file_path: acme/acme/adders/reverb/episode_test.py
imports: from acme.adders.reverb import episode
  from acme.adders.reverb import test_utils
  import numpy
  from absl.testing import absltest
  from absl.testing import parameterized
label_desc: Use image node_id 2 for calling the EpisodeAdderTest obj's underlying member method code with example usage: obj.test_max_sequence_length(max_sequence_length) without return types