class_docstr: Produces a sequence that's a slice into another sequence, without copying the elements.
  
  This assumes that the inner sequence never changes. If it does, the results
  are undefined.
class_docstr_tok: ["Produces","a","sequence","that","'s","a","slice","into","another","sequence",",","without","copying","the","elements",".","This","assumes","that","the","inner","sequence","never","changes",".","If","it","does",",","the","results","are","undefined","."]
code: def __init__(self, inner_sequence: Sequence, s: slice):
      super().__init__(
          inner_sequence, range(*s.indices(len(inner_sequence)))
      )
  
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 1 to create a new SlicedSequence object from inherited base classes: ShuffledSequence with example: obj = SlicedSequence(inner_sequence, s)