code: def end_document(self):
      self._doc_idx.append(len(self._sizes))
  
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 3 for calling the MMapIndexedDatasetBuilder obj's underlying member method code with example usage: obj.end_document() without return types