code: def test_degree_bucket_edge_ordering(idtype):
      import dgl.function as fn
  
      g = dgl.graph(
          (
              [1, 3, 5, 0, 4, 2, 3, 3, 4, 5],
              [1, 1, 0, 0, 1, 2, 2, 0, 3, 3],
          ),
          idtype=idtype,
          device=F.ctx(),
      )
      g.edata["eid"] = F.copy_to(F.arange(0, 10), F.ctx())
  
      def reducer(nodes):
          eid = F.asnumpy(F.copy_to(nodes.mailbox["eid"], F.cpu()))
          assert np.array_equal(eid, np.sort(eid, 1))
          return {"n": F.sum(nodes.mailbox["eid"], 1)}
  
      g.update_all(fn.copy_e("eid", "eid"), reducer)
  
imports: import warnings
  from collections import defaultdict
  import backend
  import dgl
  import networkx
  import numpy
  from utils import parametrize_idtype
label_desc: Use image node_id 22 for calling a global function with example usage: test_degree_bucket_edge_ordering(idtype) and returns: dict