class_docstr: Dataset with additional indexing information.
docstr: Syntactic sugar, allows .slice[i:j] to return a new IndexedDataset.
docstr_tok: ["Syntactic","sugar",",","allows",".slice","[","i",":","j","]","to","return","a","new","IndexedDataset","."]
code: def slice(self):
      """Syntactic sugar, allows .slice[i:j] to return a new IndexedDataset."""
  
      def _slicer(slice_obj):
          return IndexedDataset(
              indexed_examples=self.indexed_examples[slice_obj],
              id_fn=self.id_fn,
              base=self,
          )
  
      return SliceWrapper(_slicer)
  
imports: from collections.abc import Callable, Mapping, Sequence
  import hashlib
  import glob
  import inspect
  import os
  import random
  import types
  from typing import Optional, Union, cast
  from absl import logging
  from lit_nlp.api import types
  from lit_nlp.lib import serialize
  from lit_nlp.lib import utils
label_desc: Use image node_id 4 for calling the IndexedDataset obj's underlying member method code with example usage: obj.slice() and returns: SliceWrapper, IndexedDataset