class_docstr: Indexing edges for fast graph queries
  Sorted edges and represent edges in compressed style like csc_matrix or csr_matrix.
  
      Args:
          u: A list of node id to be compressed.
          v: A list of node id that are connected with u.
          num_nodes: The exactive number of nodes.
      
code: def from_index(cls, sorted_v, sorted_u, sorted_eid, degree, indptr):
      self = cls()
      self._degree = degree
      self._sorted_v = sorted_v
      self._sorted_u = sorted_u
      self._sorted_eid = sorted_eid
      self._indptr = indptr
      self._is_tensor = check_is_tensor(
          sorted_v, sorted_u, sorted_eid, degree, indptr
      )
      return self
  
imports: import os
  import json
  import copy
  import numpy
  import paddle
  from paddle.framework import core
  from pgl.utils import op
  import pgl.graph_kernel
  from pgl.utils.helper import check_is_tensor, to_paddle_tensor
label_desc: Use image node_id 2 for calling the EdgeIndex obj's underlying member method code with example usage: obj.from_index(cls, sorted_v, sorted_u, sorted_eid, degree, indptr) and returns: self