code: def elist2tensor(elist, idtype):
      """Function to convert an edge list to edge tensors.
  
      Parameters
      ----------
      elist : iterable of int pairs
          List of (src, dst) node ID pairs.
      idtype : int32, int64, optional
          Integer ID type. Must be int32 or int64.
  
      Returns
      -------
      (Tensor, Tensor)
          Edge tensors.
      """
      if len(elist) == 0:
          u, v = [], []
      else:
          u, v = zip(*elist)
          u = list(u)
          v = list(v)
      return F.tensor(u, idtype), F.tensor(v, idtype)
  
file_path: dgl/python/dgl/utils/data.py
imports: from collections import namedtuple
  import networkx
  import scipy
  from ..None import backend
  from ..base import DGLError
  from .None import checks
label_desc: Use image node_id 1 for calling a global function with example usage: elist2tensor(elist, idtype) and returns: F,  F