code: def random_block(size):
      g = dgl.from_networkx(nx.erdos_renyi_graph(size, 0.1))
      return dgl.to_block(
          g, np.unique(F.zerocopy_to_numpy(g.edges()[1]))
      )
  
imports: from collections import defaultdict
  import backend
  import dgl
  import networkx
  import numpy
  import scipy.sparse
label_desc: Use image node_id 19 for calling a global function with example usage: random_block(size) and returns: dgl