class_docstr: An ArrayList is a strongly typed list whose type can be anything that can
  be interpreted as a numpy data type.
docstr: x.__getitem__(y) <==> x[y]
docstr_tok: ["x.__getitem__","(","y",")","<","==",">","x","[","y","]"]
code: def __getitem__(self, key):
      """x.__getitem__(y) <==> x[y]"""
      if isinstance(key, int):
          if key < 0:
              key += len(self)
          if key < 0 or key >= len(self):
              raise IndexError("Tuple index out of range")
          dstart = self._items[key][0]
          dstop = self._items[key][1]
          return self._data[dstart:dstop]
  
      elif isinstance(key, slice):
          istart, istop, step = key.indices(len(self))
          if istart > istop:
              istart, istop = istop, istart
          dstart = self._items[istart][0]
          if istart == istop:
              dstop = dstart
          else:
              dstop = self._items[istop - 1][1]
          return self._data[dstart:dstop]
  
      elif isinstance(key, str):
          return self._data[key][: self._size]
  
      elif key is Ellipsis:
          return self.data
  
      else:
          raise TypeError("List indices must be integers")
  
file_path: vispy/vispy/visuals/collections/array_list.py
imports: import numpy
label_desc: Use image node_id 9 for calling the ArrayList obj's underlying member method code with example usage: obj.__getitem__(key) and returns: self, self, self, self