code: def __init__(self, data, starts):
      self.data = data
      self.starts = starts
      assert self.starts[0] == 0
      assert self.starts[-1] == len(self.data)
      assert (self.starts[1:] >= self.starts[:-1]).all()
      assert (self.starts > -1).all()
  
file_path: fairseq/examples/MMPT/mmpt/utils/shardedtensor.py
imports: import os
  import pickle
  import numpy
label_desc: Use image node_id 1 to create a new ShardedTensor object from inherited base classes: object with example: obj = ShardedTensor(data, starts)