docstr: Check the degree
          
docstr_tok: ["Check","the","degree"]
code: def test_check_degree(self):
      """Check the degree"""
      num_nodes = 5
      edges = [(0, 1), (1, 2), (3, 4)]
      g1 = pgl.Graph(edges=edges, num_nodes=num_nodes)
      indegree = np.array([0, 1, 1, 0, 1], dtype="int32")
      outdegree = np.array([1, 1, 0, 1, 0], dtype="int32")
      # check degree in numpy
  
      res = g1.indegree()
      self.assertTrue(np.all(res == indegree))
  
      # get degree from specific nodes
      res = g1.indegree(nodes=[1, 2, 3])
      self.assertTrue(np.all(res == indegree[[1, 2, 3]]))
  
      res = g1.outdegree()
      self.assertTrue(np.all(res == outdegree))
  
      # get degree from specific nodes
      res = g1.outdegree(nodes=[1, 2, 3])
      self.assertTrue(np.all(res == outdegree[[1, 2, 3]]))
  
      # check degree in Tensor
      g1.tensor()
  
      res = g1.indegree().numpy()
      self.assertTrue(np.all(res == indegree))
  
      # get degree from specific nodes
      res = g1.indegree(nodes=paddle.to_tensor([1, 2, 3])).numpy()
      self.assertTrue(np.all(res == indegree[[1, 2, 3]]))
  
      res = g1.outdegree().numpy()
      self.assertTrue(np.all(res == outdegree))
  
      # get degree from specific nodes
      res = g1.outdegree(nodes=paddle.to_tensor([1, 2, 3])).numpy()
      self.assertTrue(np.all(res == outdegree[[1, 2, 3]]))
  
imports: import os
  import unittest
  import numpy
  import paddle
  import pgl
  from testsuite import create_random_graph
label_desc: Use image node_id 6 for calling the GraphTest obj's underlying member method code with example usage: obj.test_check_degree() without return types