code: def __init__(
      self,
      out_file,
      chunk_size,
      pad_id,
      retrieval_db=False,
      dtype=np.int64,
      stride=64,
  ):
      self._data_file = open(out_file, "wb")
      self._dtype = dtype
      self.chunk_size = chunk_size
      self._sizes = []
      self.retrieval_db = retrieval_db
      self.pad_id = pad_id
      self.stride = stride
  
imports: import os
  import shutil
  import struct
  from functools import lru_cache
  from itertools import accumulate
  from typing import List
  import numpy
  import torch
  from nemo.utils import logging
label_desc: Use image node_id 1 to create a new MMapRetrievalIndexedDatasetBuilder object from inherited base classes: object with example: obj = MMapRetrievalIndexedDatasetBuilder(out_file, chunk_size, pad_id, retrieval_db, dtype, stride)