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.
      
docstr: Convert the EdgeIndex into paddle.Tensor format.
  
  In paddle.Tensor format, the graph edges and node features are in paddle.Tensor format.
  You can use send and recv in paddle.Tensor graph. Besides, we support converting numpy
  to UVA(Unified Virtual Addressing) tensor format, which can store the graph structure
  on CPU memory while compute using GPU.
  
  Args:
  
      inplace: (Default True) Whether to convert the graph into tensor inplace. 
      uva: (Default True) Whether to convert the graph into UVA tensor mode.
docstr_tok: ["Convert","the","EdgeIndex","into","paddle.Tensor","format",".","In","paddle.Tensor","format",",","the","graph","edges","and","node","features","are","in","paddle.Tensor","format",".","You","can","use","send","and","recv","in","paddle.Tensor","graph",".","Besides",",","we","support","converting","numpy","to","UVA","(","Unified","Virtual","Addressing",")","tensor","format",",","which","can","store","the","graph","structure","on","CPU","memory","while","compute","using","GPU",".","Args",":","inplace",":","(","Default","True",")","Whether","to","convert","the","graph","into","tensor","inplace",".","uva",":","(","Default","True",")","Whether","to","convert","the","graph","into","UVA","tensor","mode","."]
code: def tensor(self, inplace=True, uva=False):
      """Convert the EdgeIndex into paddle.Tensor format.
  
      In paddle.Tensor format, the graph edges and node features are in paddle.Tensor format.
      You can use send and recv in paddle.Tensor graph. Besides, we support converting numpy
      to UVA(Unified Virtual Addressing) tensor format, which can store the graph structure
      on CPU memory while compute using GPU.
  
      Args:
  
          inplace: (Default True) Whether to convert the graph into tensor inplace.
          uva: (Default True) Whether to convert the graph into UVA tensor mode.
  
      """
  
      if self._is_tensor:
          # already tensor
          return self
  
      if not paddle.device.is_compiled_with_cuda() and uva:
          raise ValueError(
              "uva mode should be run under gpu environment!"
          )
  
      if inplace:
          self._sorted_u = to_paddle_tensor(self._sorted_u, uva)
          self._sorted_v = to_paddle_tensor(self._sorted_v, uva)
          self._sorted_eid = to_paddle_tensor(self._sorted_eid, uva)
          self._degree = to_paddle_tensor(self._degree, uva)
          self._indptr = to_paddle_tensor(self._indptr, uva)
          self._is_tensor = True
          return self
      else:
          sorted_u = to_paddle_tensor(self._sorted_u, uva)
          sorted_v = to_paddle_tensor(self._sorted_v, uva)
          sorted_eid = to_paddle_tensor(self._sorted_eid, uva)
          degree = to_paddle_tensor(self._degree, uva)
          indptr = to_paddle_tensor(self._indptr, uva)
          return EdgeIndex.from_index(
              sorted_v=sorted_v,
              sorted_u=sorted_u,
              sorted_eid=sorted_eid,
              indptr=indptr,
              degree=degree,
          )
  
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 9 for calling the EdgeIndex obj's underlying member method code with example usage: obj.tensor(inplace, uva) and returns: self, self, EdgeIndex