code: def generate_rand_graph(n):
      arr = (
          sp.sparse.random(n, n, density=0.1, format="coo") != 0
      ).astype(np.int64)
      return dgl.from_scipy(arr)
  
imports: import os
  import tempfile
  import time
  import unittest
  import warnings
  import backend
  import dgl
  import dgl.ndarray
  import numpy
  import pytest
  import scipy
  from dgl.data.utils import load_labels, load_tensors, save_tensors
label_desc: Use image node_id 1 for calling a global function with example usage: generate_rand_graph(n) and returns: dgl