class_docstr: Produces a shuffled view of a sequence, such as a list.
  
  This assumes that the inner sequence never changes. If it does, the results
  are undefined.
class_docstr_tok: ["Produces","a","shuffled","view","of","a","sequence",",","such","as","a","list",".","This","assumes","that","the","inner","sequence","never","changes",".","If","it","does",",","the","results","are","undefined","."]
code: def __getitem__(self, i: Union[int, slice]):
      if isinstance(i, int):
          return self.inner[self.indices[i]]
      else:
          return ShuffledSequence(self.inner, self.indices[i])
  
file_path: allennlp/allennlp/common/sequences.py
imports: import bisect
  import random
  from collections import abc
  from typing import Sequence, Optional, Union
label_desc: Use image node_id 3 for calling the ShuffledSequence obj's underlying member method code with example usage: obj.__getitem__(i) and returns: self, ShuffledSequence