code: def generate_graph(n):
      arr = sp.sparse.random(n, n, density=0.2, format="coo")
      arr.data = np.arange(0, len(arr.row), dtype=np.float32)
      return arr.tocsr(), mx.nd.sparse.csr_matrix(arr.tocsr()).astype(
          np.int64
      )
  
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 7 for calling a global function with example usage: generate_graph(n) and returns: arr,  mx