code: def deepwalk_model(graph, hidden_size=16, neg_num=5):
      pyreader = l.py_reader(
          capacity=70,
          shapes=[[-1, 1, 1], [-1, 1, 1], [-1, neg_num, 1]],
          dtypes=["int64", "int64", "int64"],
          lod_levels=[0, 0, 0],
          name="train",
          use_double_buffer=True,
      )
  
      embed_init = fluid.initializer.UniformInitializer(
          low=-1.0, high=1.0
      )
      weight_init = fluid.initializer.TruncatedNormal(
          scale=1.0 / math.sqrt(hidden_size)
      )
  
      src, pos, negs = l.read_file(pyreader)
  
      embed_src = l.embedding(
          input=src,
          size=[graph.num_nodes, hidden_size],
          param_attr=fluid.ParamAttr(
              name="content", initializer=embed_init
          ),
      )
  
      weight_pos = l.embedding(
          input=pos,
          size=[graph.num_nodes, hidden_size],
          param_attr=fluid.ParamAttr(
              name="weight", initializer=weight_init
          ),
      )
      weight_negs = l.embedding(
          input=negs,
          size=[graph.num_nodes, hidden_size],
          param_attr=fluid.ParamAttr(
              name="weight", initializer=weight_init
          ),
      )
  
      pos_logits = l.matmul(
          embed_src, weight_pos, transpose_y=True
      )  # [batch_size, 1, 1]
      neg_logits = l.matmul(
          embed_src, weight_negs, transpose_y=True
      )  # [batch_size, 1, neg_num]
  
      ones_label = pos_logits * 0.0 + 1.0
      ones_label.stop_gradient = True
      pos_loss = l.sigmoid_cross_entropy_with_logits(
          pos_logits, ones_label
      )
  
      zeros_label = neg_logits * 0.0
      zeros_label.stop_gradient = True
      neg_loss = l.sigmoid_cross_entropy_with_logits(
          neg_logits, zeros_label
      )
      loss = (l.reduce_mean(pos_loss) + l.reduce_mean(neg_loss)) / 2
  
      return pyreader, loss
  
imports: import argparse
  import time
  import math
  import os
  import io
  from multiprocessing import Pool
  import glob
  import numpy
  import sklearn.metrics
  from sklearn.metrics import f1_score
  import pgl
  from pgl import data_loader
  from pgl.utils import op
  from pgl.utils.logger import log
  import paddle.fluid
  import paddle.fluid.layers
label_desc: Use image node_id 2 for calling a global function with example usage: deepwalk_model(graph, hidden_size, neg_num) and returns: pyreader,  loss