code: def edge_func(lhs_target, rhs_target, msg):
      def foo(edges):
          return {
              "m": binary_op(
                  msg,
                  select(lhs_target, edges.src, edges.data, edges.dst)[
                      "x"
                  ],
                  select(rhs_target, edges.src, edges.data, edges.dst)[
                      "y"
                  ],
              )
          }
  
      return foo
  
imports: import random
  import unittest
  import backend
  import dgl
  import numpy
  import pytest
  import torch
  from dgl.ops import gather_mm, gsddmm, gspmm, segment_reduce
  from utils import parametrize_idtype
  from utils.graph_cases import get_cases
label_desc: Use image node_id 3 for calling a global function with example usage: edge_func(lhs_target, rhs_target, msg) and returns: foo, dict