code: def test_arraysequence_append(self):
      element = generate_data(
          nb_arrays=1,
          common_shape=SEQ_DATA["seq"].common_shape,
          rng=SEQ_DATA["rng"],
      )[0]
  
      # Append a new element.
      seq = SEQ_DATA[
          "seq"
      ].copy()  # Copy because of in-place modification.
      seq.append(element)
      check_arr_seq(seq, SEQ_DATA["data"] + [element])
  
      # Append a list of list.
      seq = SEQ_DATA[
          "seq"
      ].copy()  # Copy because of in-place modification.
      seq.append(element.tolist())
      check_arr_seq(seq, SEQ_DATA["data"] + [element])
  
      # Append to an empty ArraySequence.
      seq = ArraySequence()
      seq.append(element)
      check_arr_seq(seq, [element])
  
      # Append an empty array.
      seq = SEQ_DATA[
          "seq"
      ].copy()  # Copy because of in-place modification.
      seq.append([])
      check_arr_seq(seq, SEQ_DATA["seq"])
  
      # Append an element with different shape.
      element = generate_data(
          nb_arrays=1,
          common_shape=SEQ_DATA["seq"].common_shape * 2,
          rng=SEQ_DATA["rng"],
      )[0]
      with pytest.raises(ValueError):
          seq.append(element)
  
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 7 for calling the TestArraySequence obj's underlying member method code with example usage: obj.test_arraysequence_append() without return types