docstr: Args:
      generator: an instance of NodeGenerator
docstr_tok: ["Args",":","generator",":","an","instance","of","NodeGenerator"]
code: def __call__(self, generator):
      """
      Args:
          generator: an instance of NodeGenerator
      """
      self.node_generator = generator
  
      walk_generator = getattr(self, self.gen_mode)
      walk_generator = AsynchronousGenerator(
          walk_generator, maxsize=1000
      )
  
      walk_cc = 0
      batch_count = 0
      for walks in stream_shuffle_generator(
          walk_generator,
          self.walk_batch_size,
          self.walk_stream_shuffle_size,
      ):
          walk_cc += len(walks)
          batch_count += 1
          if walk_cc % 40000 == 0 and self.rank == 0:
              log.info(
                  "the walk length is [%s] in rank [%s]"
                  % (len(walks[0]), self.rank)
              )
          yield walks
      log.info(
          "total [%s] number walks in rank [%s]" % (walk_cc, self.rank)
      )
  
file_path: PGL/apps/Graph4Rec/env_run/src/datasets/walk.py
imports: import os
  import sys
  import time
  import warnings
  import numpy
  from collections import defaultdict
  from pgl.utils.logger import log
  from pgl.distributed import DistGraphClient, DistGraphServer
  from utils.config import prepare_config
  from datasets.helper import stream_shuffle_generator, AsynchronousGenerator
  from datasets.node import NodeGenerator
  import datasets.sampling
label_desc: Use image node_id 2 for calling the WalkGenerator obj's underlying member method code with example usage: obj.__call__(generator) without return types