code: def edge_attrs(edge):
      # Edges in Networkx are in the format (src, dst, attrs)
      return edge[2]
  
file_path: dgl/tests/python/common/test_convert.py
imports: import unittest
  import backend
  import dgl
  from utils import parametrize_idtype
label_desc: Use image node_id 2 for calling a global function with example usage: edge_attrs(edge) and returns: edge