code: def walk_from_graph(self):
      def node_generator():
          if self.train_files is None:
              while True:
                  for nodes in self.graph.node_batch_iter(
                      self.batch_size
                  ):
                      yield nodes
          else:
              nodes = []
              while True:
                  for filename in self.train_files:
                      with io.open(filename) as inf:
                          for line in inf:
                              node = int(line.strip("\n\t"))
                              nodes.append(node)
                              if len(nodes) == self.batch_size:
                                  yield nodes
                                  nodes = []
              if len(nodes):
                  yield nodes
  
      if (
          "alias" in self.graph.node_feat
          and "events" in self.graph.node_feat
      ):
          log.info("Deepwalk using alias sample")
      for nodes in node_generator():
          if (
              "alias" in self.graph.node_feat
              and "events" in self.graph.node_feat
          ):
              walks = deepwalk_sample(
                  self.graph, nodes, self.walk_len, "alias", "events"
              )
          else:
              walks = deepwalk_sample(self.graph, nodes, self.walk_len)
          yield walks
  
imports: from __future__ import division
  from __future__ import absolute_import
  from __future__ import print_function
  import time
  import io
  import os
  import numpy
  import paddle
  from pgl.utils.logger import log
  from pgl.sample import node2vec_sample
  from pgl.sample import deepwalk_sample
  from pgl.sample import alias_sample
  from pgl.graph_kernel import skip_gram_gen_pair
  from pgl.graph_kernel import alias_sample_build_table
  from pgl.utils import mp_reader
label_desc: Use image node_id 3 for calling the DeepwalkReader obj's underlying member method code with example usage: obj.walk_from_graph() without return types