class_docstr: Dataset as a concatenation of multiple datasets.
  
  This class is useful to assemble different existing datasets.
  
  Args:
      datasets (sequence): List of datasets to be concatenated
class_docstr_tok: ["Dataset","as","a","concatenation","of","multiple","datasets",".","This","class","is","useful","to","assemble","different","existing","datasets",".","Args",":","datasets","(","sequence",")",":","List","of","datasets","to","be","concatenated"]
code: def cumsum(sequence):
      r, s = [], 0
      for e in sequence:
          l = len(e)
          r.append(l + s)
          s += l
      return r
  
imports: import bisect
  import itertools
  import math
  import warnings
  from typing import cast, Dict, Generic, Iterable, List, Optional, Sequence, Tuple, TypeVar, Union
  from torch import default_generator, randperm
  from ...None import Generator, Tensor
label_desc: Use image node_id 1 for calling the ConcatDataset obj's underlying member method code with example usage: obj.cumsum(sequence) and returns: r