code: def check_uniform(out, num_hops, max_num_vertices):
      sample_id = out[0]
      sub_csr = out[1]
      layer = out[2]
      # check sample_id
      assert len(sample_id) == max_num_vertices + 1
      num_vertices = sample_id[-1].asnumpy()[0]
      # check sub_csr
      sub_csr.check_format(full_check=True)
      assert np.all(
          (
              sub_csr.indptr[num_vertices:]
              == sub_csr.indptr[num_vertices]
          ).asnumpy()
      )
      # check layer
      for data in layer[:num_vertices]:
          assert data <= num_hops
  
file_path: mxnet/tests/python/unittest/test_dgl_graph.py
imports: from __future__ import print_function
  import numpy
  import scipy
  import mxnet
  import random
  import itertools
  from numpy.testing import assert_allclose, assert_array_equal
  from mxnet.test_utils import *
  import unittest
label_desc: Use image node_id 1 for calling a global function with example usage: check_uniform(out, num_hops, max_num_vertices) without return types