code: def __call__(self):
      iterval = 20000000 * 24 // self.config.walk_len
      pair_count = 0
      for walks in self.walk_generator():
          try:
              for walk in walks:
                  index = np.arange(0, len(walk), dtype="int64")
                  batch_s, batch_p = skip_gram_gen_pair(
                      index, self.config.win_size
                  )
                  for s, p in zip(batch_s, batch_p):
                      yield walk[s], walk[p]
                      pair_count += 1
                      if pair_count % iterval == 0 and self.rank == 0:
                          log.info(
                              "[%s] pairs have been loaded in rank [%s]"
                              % (pair_count, self.rank)
                          )
  
          except Exception as e:
              log.exception(e)
  
      log.info(
          "total [%s] pairs in rank [%s]" % (pair_count, self.rank)
      )
  
file_path: PGL/examples/metapath2vec/datasets/pair.py
imports: import os
  import sys
  import time
  import warnings
  import numpy
  from collections import defaultdict
  from pgl.graph_kernel import skip_gram_gen_pair
  from pgl.utils.logger import log
  from pgl.distributed import DistGraphClient, DistGraphServer
  from pgl.utils.data import Dataloader, StreamDataset
  from utils.config import prepare_config
  from datasets.node import NodeGenerator
  from datasets.walk import WalkGenerator
label_desc: Use image node_id 2 for calling the PairGenerator obj's underlying member method code with example usage: obj.__call__() without return types