code: def test_send_func(self):
      src_num_nodes = 4
      dst_num_nodes = 5
      edges = [(0, 1), (1, 2), (3, 4)]
      src_nfeat = np.arange(src_num_nodes).reshape(-1, 1)
      dst_nfeat = np.arange(dst_num_nodes).reshape(-1, 1)
      efeat = np.arange(len(edges)).reshape(-1, 1)
  
      g1 = pgl.BiGraph(
          edges=edges,
          src_num_nodes=src_num_nodes,
          dst_num_nodes=dst_num_nodes,
          src_node_feat={"src_nfeat": src_nfeat},
          dst_node_feat={"dst_nfeat": dst_nfeat},
          edge_feat={"efeat": efeat},
      )
  
      target_src = np.array([0, 1, 3]).reshape(-1, 1)
      target_dst = np.array([1, 2, 4]).reshape(-1, 1)
      target_edge = np.array([0, 1, 2]).reshape(-1, 1)
  
      g1.tensor()
      src_copy = lambda sf, df, ef: {"h": sf["h"], "e": ef["e"]}
      dst_copy = lambda sf, df, ef: {"h": df["h"], "e": ef["e"]}
      both_copy = lambda sf, df, ef: {
          "sh": sf["h"],
          "dh": df["h"],
          "e": ef["e"],
      }
  
      msg = g1.send(
          src_copy,
          src_feat={"h": g1.src_node_feat["src_nfeat"]},
          edge_feat={"e": g1.edge_feat["efeat"]},
      )
      self.assertTrue((msg["h"].numpy() == target_src).all())
      self.assertTrue((msg["e"].numpy() == target_edge).all())
  
      msg = g1.send(
          dst_copy,
          dst_feat={"h": g1.dst_node_feat["dst_nfeat"]},
          edge_feat={"e": g1.edge_feat["efeat"]},
      )
      self.assertTrue((msg["h"].numpy() == target_dst).all())
      self.assertTrue((msg["e"].numpy() == target_edge).all())
  
      msg = g1.send(
          both_copy,
          src_feat={"h": g1.src_node_feat["src_nfeat"]},
          dst_feat={"h": g1.dst_node_feat["dst_nfeat"]},
          edge_feat={"e": g1.edge_feat["efeat"]},
      )
      self.assertTrue((msg["sh"].numpy() == target_src).all())
      self.assertTrue((msg["dh"].numpy() == target_dst).all())
      self.assertTrue((msg["e"].numpy() == target_edge).all())
  
imports: import os
  import unittest
  import numpy
  import paddle
  import pgl
  from testsuite import create_random_bigraph
label_desc: Use image node_id 10 for calling the BiGraphTest obj's underlying member method code with example usage: obj.test_send_func() without return types