code: def test_arraysequence_getitem(self):
      # Get one item
      for i, e in enumerate(SEQ_DATA["seq"]):
          assert_array_equal(SEQ_DATA["seq"][i], e)
  
      # Get all items using indexing (creates a view).
      indices = list(range(len(SEQ_DATA["seq"])))
      seq_view = SEQ_DATA["seq"][indices]
      check_arr_seq_view(seq_view, SEQ_DATA["seq"])
      # We took all elements so the view should match the original.
      check_arr_seq(seq_view, SEQ_DATA["seq"])
  
      # Get multiple items using ndarray of dtype integer.
      for dtype in [np.int8, np.int16, np.int32, np.int64]:
          seq_view = SEQ_DATA["seq"][np.array(indices, dtype=dtype)]
          check_arr_seq_view(seq_view, SEQ_DATA["seq"])
          # We took all elements so the view should match the original.
          check_arr_seq(seq_view, SEQ_DATA["seq"])
  
      # Get multiple items out of order (creates a view).
      SEQ_DATA["rng"].shuffle(indices)
      seq_view = SEQ_DATA["seq"][indices]
      check_arr_seq_view(seq_view, SEQ_DATA["seq"])
      check_arr_seq(seq_view, [SEQ_DATA["data"][i] for i in indices])
  
      # Get slice (this will create a view).
      seq_view = SEQ_DATA["seq"][::2]
      check_arr_seq_view(seq_view, SEQ_DATA["seq"])
      check_arr_seq(seq_view, SEQ_DATA["data"][::2])
  
      # Use advanced indexing with ndarray of data type bool.
      selection = np.array([False, True, True, False, True])
      seq_view = SEQ_DATA["seq"][selection]
      check_arr_seq_view(seq_view, SEQ_DATA["seq"])
      check_arr_seq(
          seq_view,
          [
              SEQ_DATA["data"][i]
              for i, keep in enumerate(selection)
              if keep
          ],
      )
  
      # Test invalid indexing
      with pytest.raises(TypeError):
          SEQ_DATA["seq"]["abc"]
  
      # Get specific columns.
      seq_view = SEQ_DATA["seq"][:, 2]
      check_arr_seq_view(seq_view, SEQ_DATA["seq"])
      check_arr_seq(seq_view, [d[:, 2] for d in SEQ_DATA["data"]])
  
      # Combining multiple slicing and indexing operations.
      seq_view = SEQ_DATA["seq"][::-2][:, 2]
      check_arr_seq_view(seq_view, SEQ_DATA["seq"])
      check_arr_seq(seq_view, [d[:, 2] for d in SEQ_DATA["data"][::-2]])
  
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 9 for calling the TestArraySequence obj's underlying member method code with example usage: obj.test_arraysequence_getitem() without return types