code: def __init__(self, out_file, dtype=np.int32):
      self.out_file = open(out_file, "wb")
      self.dtype = dtype
      self.data_offsets = [0]
      self.dim_offsets = [0]
      self.sizes = []
      self.element_size = self.element_sizes[self.dtype]
      self.doc_idx = [0]
  
imports: import os
  import shutil
  import struct
  from functools import lru_cache
  from itertools import accumulate
  import numpy
  import torch
label_desc: Use image node_id 1 to create a new IndexedDatasetBuilder object from inherited base classes: object with example: obj = IndexedDatasetBuilder(out_file, dtype)