class_docstr: Dataset with additional indexing information.
docstr: Load and return additional previously-saved datapoints for this dataset.
  
  Args:
    path: The path to the persisted datapoint file.
  
  Returns:
    (IndexedDataset) A dataset containing the loaded data.
docstr_tok: ["Load","and","return","additional","previously-saved","datapoints","for","this","dataset",".","Args",":","path",":","The","path","to","the","persisted","datapoint","file",".","Returns",":","(","IndexedDataset",")","A","dataset","containing","the","loaded","data","."]
code: def load(self, path: str):
      """Load and return additional previously-saved datapoints for this dataset.
  
      Args:
        path: The path to the persisted datapoint file.
  
      Returns:
        (IndexedDataset) A dataset containing the loaded data.
  
      """
      if not path.endswith(LIT_FILE_EXTENSION):
          # Try to load data using the base load method. If any data is
          # returned, then use that. Otherwise try loading the lit json extension
          # data format.
          base_dataset = self._base
          new_dataset = (
              base_dataset.load(path) if base_dataset else None
          )
  
          if new_dataset is not None:
              description = (
                  f"{len(new_dataset)} examples from "
                  f"{path}\n{self._base.description()}"
              )
              return IndexedDataset(
                  base=new_dataset,
                  id_fn=self.id_fn,
                  description=description,
              )
  
          path += LIT_FILE_EXTENSION
  
      with open(path, "r") as fd:
          examples = [
              cast(IndexedInput, serialize.from_json(line))
              for line in fd.readlines()
          ]
  
      # Load the side-by-side spec if it exists on disk.
      spec_path = path + LIT_SPEC_EXTENSION
      if os.path.exists(spec_path):
          with open(spec_path, "r") as fd:
              spec = serialize.from_json(fd.read())
      else:
          spec = None
  
      description = f"{len(examples)} examples from {path}"
      if self._base is not None:
          description += "\n" + self._base.description()
  
      return IndexedDataset(
          base=self._base,
          indexed_examples=examples,
          spec=spec,
          description=description,
          id_fn=self.id_fn,
      )
  
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 9 for calling the IndexedDataset obj's underlying member method code with example usage: obj.load(path) and returns: IndexedDataset, IndexedDataset