docstr: Args:
      generator: a instance of generator as the input of PairGenerator
docstr_tok: ["Args",":","generator",":","a","instance","of","generator","as","the","input","of","PairGenerator"]
code: def __call__(self, generator):
      """
      Args:
          generator: a instance of generator as the input of PairGenerator
      """
      self.generator = generator
  
      pair_generator = self.base_pair_generator
      pair_generator = AsynchronousGenerator(
          pair_generator, maxsize=1000
      )
  
      for pair in pair_generator():
          yield pair
  
file_path: PGL/apps/Graph4Rec/env_run/src/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
  from datasets.helper import stream_shuffle_generator, AsynchronousGenerator
label_desc: Use image node_id 2 for calling the PairGenerator obj's underlying member method code with example usage: obj.__call__(generator) without return types