class_docstr: Walk generator
class_docstr_tok: ["Walk","generator"]
code: def __init__(self, config, dataset):
      self.config = config
      self.dataset = dataset
      self.graph = self.dataset.graph
      self.walk_mode = self.config.walk_mode
      self.node_generator = NodeGenerator(self.config, self.graph)
  
      if self.walk_mode == "multi_m2v":
          num_path = len(self.config.meta_path.split(";"))
          num_first_node_type = len(
              self.config.first_node_type.split(";")
          )
          assert (
              num_first_node_type == num_path
          ), "In [multi_m2v] walk_mode, the number of metapath should be the same \
                  as the number of first_node_type"
  
          assert (
              num_path > 1
          ), "In [multi_m2v] walk_mode, the number of metapath\
                      should be greater than 1"
  
imports: from __future__ import division
  from __future__ import absolute_import
  from __future__ import print_function
  import time
  import io
  import os
  import numpy
  import random
  from pgl.utils.logger import log
  from pgl.sample import metapath_randomwalk
  from pgl.graph_kernel import skip_gram_gen_pair
  from pgl.graph_kernel import alias_sample_build_table
  from utils import load_config
  from graph import m2vGraph
  import mp_reader
label_desc: Use image node_id 1 to create a new WalkGenerator object from inherited base classes: object with example: obj = WalkGenerator(config, dataset)