class_docstr: GESReader
      
class_docstr_tok: ["GESReader"]
code: def __call__(self):
      np.random.seed(os.getpid())
      if self.neg_sample_type == "outdegree":
          outdegree = self.graph.outdegree()
          distribution = 1.0 * outdegree / outdegree.sum()
          alias, events = alias_sample_build_table(distribution)
      max_len = int(
          self.batch_size * self.walk_len * ((1 + self.win_size) - 0.3)
      )
      for walks in self.walk_generator():
          src, pos = [], []
          for walk in walks:
              s, p = skip_gram_gen_pair(walk, self.win_size)
              src.extend(s), pos.extend(p)
          src = (np.array(src, dtype=np.int64),)
          pos = np.array(pos, dtype=np.int64)
          src, pos = np.reshape(src, [-1, 1, 1]), np.reshape(
              pos, [-1, 1, 1]
          )
  
          if src.shape[0] == 0:
              continue
          neg_sample_size = [len(pos), self.neg_num, 1]
          if self.neg_sample_type == "average":
              negs = self.graph.sample_nodes(neg_sample_size)
          elif self.neg_sample_type == "outdegree":
              negs = alias_sample(neg_sample_size, alias, events)
          # [batch_size, 1, 1] [batch_size, neg_num+1, 1]
          dst = np.concatenate([pos, negs], 1)
          src_feat = np.concatenate(
              [src, self.node_feat[src[:, :, 0]]], -1
          )
          dst_feat = np.concatenate(
              [dst, self.node_feat[dst[:, :, 0]]], -1
          )
          src_feat, dst_feat = np.expand_dims(
              src_feat, -1
          ), np.expand_dims(dst_feat, -1)
          yield src_feat[:max_len], dst_feat[:max_len]
  
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
label_desc: Use image node_id 5 for calling the GESReader obj's underlying member method code with example usage: obj.__call__() without return types