class_docstr: Dataloader for loading batch data
  
  Example:
  
      .. code-block:: python
  
          from pgl.utils.data import Dataset
          from pgl.utils.data.dataloader import Dataloader
  
          class MyDataset(Dataset):
              def __init__(self):
                  self.data = list(range(0, 40))
  
              def __getitem__(self, idx):
                  return self.data[idx]
  
              def __len__(self):
                  return len(self.data)
  
          def collate_fn(batch_examples):
              inputs = np.array(batch_examples, dtype="int64")
              return inputs
  
          dataset = MyDataset()
          loader = Dataloader(dataset, 
                              batch_size=3,
                              drop_last=False,
                              shuffle=True,
                              num_workers=4,
                              collate_fn=collate_fn)
  
          for batch_data in loader:
              print(batch_data)
code: def __iter__(self):
      # random seed will be fixed when using multiprocess,
      # so set seed explicitly every time
      np.random.seed()
      if self.num_workers == 1:
          r = paddle.reader.buffered(
              _DataLoaderIter(self, 0), self.buf_size
          )
      else:
          worker_pool = [
              _DataLoaderIter(self, wid)
              for wid in range(self.num_workers)
          ]
          workers = mp_reader.multiprocess_reader(
              worker_pool, use_pipe=True, queue_size=1000
          )
          r = paddle.reader.buffered(workers, self.buf_size)
  
      for batch in r():
          yield batch
  
imports: import warnings
  import time
  import numpy
  from collections import namedtuple
  import paddle
  from pgl.utils import mp_reader
  from pgl.utils.data.dataset import Dataset, StreamDataset
  from pgl.utils.data.sampler import Sampler, StreamSampler
label_desc: Use image node_id 3 for calling the Dataloader obj's underlying member method code with example usage: obj.__iter__() without return types