code: def test_save_and_load_arraysequence(self):
      # Test saving and loading an empty ArraySequence.
      with tempfile.TemporaryFile(mode="w+b", suffix=".npz") as f:
          seq = ArraySequence()
          seq.save(f)
          f.seek(0, os.SEEK_SET)
          loaded_seq = ArraySequence.load(f)
          assert_array_equal(loaded_seq._data, seq._data)
          assert_array_equal(loaded_seq._offsets, seq._offsets)
          assert_array_equal(loaded_seq._lengths, seq._lengths)
  
      # Test saving and loading a ArraySequence.
      with tempfile.TemporaryFile(mode="w+b", suffix=".npz") as f:
          seq = SEQ_DATA["seq"]
          seq.save(f)
          f.seek(0, os.SEEK_SET)
          loaded_seq = ArraySequence.load(f)
          assert_array_equal(loaded_seq._data, seq._data)
          assert_array_equal(loaded_seq._offsets, seq._offsets)
          assert_array_equal(loaded_seq._lengths, seq._lengths)
  
          # Make sure we can add new elements to it.
          loaded_seq.append(SEQ_DATA["data"][0])
  
imports: import itertools
  import os
  import sys
  import tempfile
  import unittest
  import numpy
  import pytest
  from numpy.testing import assert_array_equal
  from ...testing import assert_arrays_equal
  from ..array_sequence import ArraySequence, concatenate, is_array_sequence
label_desc: Use image node_id 13 for calling the TestArraySequence obj's underlying member method code with example usage: obj.test_save_and_load_arraysequence() without return types