class_docstr: Dataloader for already preprocessed data in hdf5 files that is already in the format expected by BERT model.
class_docstr_tok: ["Dataloader","for","already","preprocessed","data","in","hdf5","files","that","is","already","in","the","format","expected","by","BERT","model","."]
code: def __iter__(self):
      self.random.shuffle(self.data_files)
      for data_file in self.data_files:
          train_data = BertPretrainingPreprocessedDataset(
              input_file=data_file,
              max_predictions_per_seq=self.max_predictions_per_seq,
          )
          train_sampler = DistributedSampler(train_data)
          # print("---")
          # print(os.getpid(), train_sampler.rank, train_sampler.num_replicas, train_sampler.num_samples)
          # print("---")
          train_dataloader = DataLoader(
              dataset=train_data,
              sampler=train_sampler,
              batch_size=self.batch_size,
              shuffle=False,
          )
          for x in train_dataloader:
              yield x
  
imports: import array
  import os
  import pickle
  import random
  from typing import Dict, List, Optional
  import h5py
  import numpy
  from torch.utils.data import DataLoader, DistributedSampler
  from tqdm import tqdm
  from nemo.collections.nlp.data.data_utils.data_preprocessing import find_newlines, load_data_indices
  from nemo.core.classes import Dataset
label_desc: Use image node_id 2 for calling the BertPretrainingPreprocessedDataloader obj's underlying member method code with example usage: obj.__iter__() without return types