code: def __init__(self, path, mmap=False):
      path = Path(path)
      self.path = path
  
      mmap_mode = "r" if mmap else None
  
      self.data = np.load(str(path / "data.npy"), mmap_mode=mmap_mode)
      self.is_next = np.load(
          str(path / "is_next.npy"), mmap_mode=mmap_mode
      )
      self.tokens_split = np.load(
          str(path / "tokens_split.npy"), mmap_mode=mmap_mode
      )
      self.instance_offsets = np.load(
          str(path / "instance_offsets.npy"), mmap_mode=mmap_mode
      )
  
      if (path / "instance_token_offsets.npy").is_file():
          self.use_separators = False
          self.instance_token_offsets = np.load(
              str(path / "instance_token_offsets.npy"),
              mmap_mode=mmap_mode,
          )
          self.token_offsets = np.load(
              str(path / "token_offsets.npy"), mmap_mode=mmap_mode
          )
      else:
          self.use_separators = True
          self.instance_token_offsets = None
          self.token_offsets = None
  
      if (path / "lang.npy").is_file():
          self.multilingual = True
          self.lang = np.load(
              str(path / "lang.npy"), mmap_mode=mmap_mode
          )
      else:
          self.multilingual = False
          self.lang = None
  
      self.instances = NumpyByteInstances(self)
  
      self.len = len(self.is_next)
  
imports: from tqdm import tqdm
  from typing import Tuple
  from random import shuffle
  import pickle
  import random
  import numpy
  from pathlib import Path
  from pytorch_pretrained_bert.tokenization import BertTokenizer
label_desc: Use image node_id 1 to create a new NumpyPretrainingDataCreator object  with example: obj = NumpyPretrainingDataCreator(path, mmap)