code: def forward(self, feed_dict):
      heter_graph = {}
      for etype in self.all_etypes:
          heter_graph[etype] = pgl.Graph(
              num_nodes=feed_dict["num_nodes"],
              num_edges=feed_dict["num_edges_%s" % etype],
              edges=feed_dict["edges_%s" % etype],
          )
  
      # [b, dim]
      init_nfeat = self.embedding(feed_dict["origin_node_id"])
  
      if len(self.config.slots) > 0:
          nfeat_list = [init_nfeat]
          for slot in self.config.slots:
              h = self.slot_embed_dict[slot](feed_dict[slot])
              h = pgl.math.segment_sum(h, feed_dict["%s_info" % slot])
              h = paddle.nn.functional.softsign(h)
              nfeat_list.append(h)
          init_nfeat = paddle.stack(nfeat_list, axis=0)
          init_nfeat = paddle.sum(init_nfeat, axis=0)
          init_nfeat = paddle.nn.functional.softsign(init_nfeat)
  
      nfeat = init_nfeat
      for layer in range(len(self.config.sample_num_list)):
          nxt_fs = []
          for etype, g in heter_graph.items():
              nxt_f = self.convs_dict[etype][layer](
                  heter_graph[etype], nfeat
              )
              nxt_fs.append(nxt_f)
  
          if self.config.interact_mode == "gatne":
              nfeat = self.gatne(nxt_fs)
          else:
              nfeat = paddle.stack(nxt_fs, axis=1)
              nfeat = paddle.sum(nfeat, axis=1)
          nfeat = init_nfeat * self.config.res_alpha + nfeat * (
              1 - self.config.res_alpha
          )
  
      center_nfeat = paddle.gather(nfeat, feed_dict["center_node_id"])
      negs_embed = paddle.gather(center_nfeat, feed_dict["neg_idx"])
      src_and_pos = paddle.reshape(
          center_nfeat, [-1, 2, self.hidden_size]
      )
      src_embed = src_and_pos[:, 0:1, :]
      pos_embed = src_and_pos[:, 1:2, :]
      negs_embed = paddle.reshape(
          negs_embed, [-1, self.neg_num, self.hidden_size]
      )
      pos_and_neg_embed = paddle.concat([pos_embed, negs_embed], axis=1)
  
      # [batch_size, 1, 1 + neg_num]
      logits = paddle.matmul(
          src_embed, pos_and_neg_embed, transpose_y=True
      )
      # [batch_size, 1 + neg_num]
      logits = paddle.squeeze(logits, axis=1)
  
      # for inference
      self.embed = paddle.squeeze(src_embed, axis=1)
      node_ids = paddle.reshape(feed_dict["origin_node_id"], [-1, 1])
      src_center_idx = paddle.reshape(
          feed_dict["center_node_id"], [-1, 2]
      )[:, 0]
      self.node_index = paddle.gather(node_ids, src_center_idx)
  
      return logits
  
imports: import math
  import time
  from collections import OrderedDict
  import paddle
  import paddle.nn
  import paddle.distributed.fleet
  import pgl
  import pgl.nn
  from pgl.distributed import helper
  from collections import OrderedDict
  import models.embedding
  import models.layers
label_desc: Use image node_id 3 for calling the SageModel obj's underlying member method code with example usage: obj.forward(feed_dict) and returns: logits