class_docstr: analogous to fairseq.data.indexed_dataset.IndexedCachedDataset.
  Support loading .idx + .bin as fairseq does and also .npz. In self
  initializer if
  (1) path is passed in: call the initializer of parent class and loads
  idx + bin from the path.
  (2) path is None: Initialize an empty class. Call load(path) to load
  .npz data.
  When self.is_npz=True, use the implementation in this class which overrides
  parent methods. Otherwise use parent functions in fairseq.
class_docstr_tok: ["analogous","to","fairseq.data.indexed_dataset.IndexedCachedDataset",".","Support","loading",".idx","+",".bin","as","fairseq","does","and","also",".npz",".","In","self","initializer","if","(","1",")","path","is","passed","in",":","call","the","initializer","of","parent","class","and","loads","idx","+","bin","from","the","path",".","(","2",")","path","is","None",":","Initialize","an","empty","class",".","Call","load","(","path",")","to","load",".npz","data",".","When","self.is_npz=True",",","use","the","implementation","in","this","class","which","overrides","parent","methods",".","Otherwise","use","parent","functions","in","fairseq","."]
docstr: Load data set from a list of sequences, each a list or numpy array of
  indices. Note that this method removes all sentences which have been
  previously added to the data set.
docstr_tok: ["Load","data","set","from","a","list","of","sequences",",","each","a","list","or","numpy","array","of","indices",".","Note","that","this","method","removes","all","sentences","which","have","been","previously","added","to","the","data","set","."]
code: def load_from_sequences(self, sequences):
      """
      Load data set from a list of sequences, each a list or numpy array of
      indices. Note that this method removes all sentences which have been
      previously added to the data set.
      """
      array_list = []
      offsets = [0]
      sizes = []
      for inds in sequences:
          array_list.append(np.array(inds, dtype=np.int32))
          offsets.append(offsets[-1] + len(inds))
          sizes.append(len(inds))
  
      self.buffer = np.concatenate(array_list)
      self.offsets = np.array(offsets, dtype=np.int32)
      self.sizes = np.array(sizes, dtype=np.int32)
      del array_list
      del offsets
      del sizes
  
imports: import os
  import shutil
  import tempfile
  from typing import Dict, NamedTuple, Optional
  import numpy
  import torch
  from fairseq import data, tokenizer
  from fvcore.common.file_io import PathManager
  from pytorch_translate import constants
  from pytorch_translate.data import dictionary
label_desc: Use image node_id 10 for calling the InMemoryIndexedDataset obj's underlying member method code with example usage: obj.load_from_sequences(sequences) without return types