code: def binary_op(u_embed, v_embed, binary_op_type):
      if binary_op_type == "Average":
          edge_embed = (u_embed + v_embed) / 2
      elif binary_op_type == "Hadamard":
          edge_embed = u_embed * v_embed
      elif binary_op_type == "Weighted-L1":
          edge_embed = l.abs(u_embed - v_embed)
      elif binary_op_type == "Weighted-L2":
          edge_embed = (u_embed - v_embed) * (u_embed - v_embed)
      else:
          raise ValueError(
              binary_op_type + " binary_op_type doesn't exists"
          )
      return edge_embed
  
file_path: PGL/legacy/examples/deepwalk/link_predict.py
imports: import argparse
  import time
  import math
  import os
  import numpy
  from sklearn import metrics
  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: binary_op(u_embed, v_embed, binary_op_type) and returns: edge_embed