code: def create_random_hetero(type_n, node_n):
      num_nodes = {}
      for i in range(1, type_n + 1):
          num_nodes[f"n{i}"] = node_n
      c_etypes = []
      count = 0
      for i in range(1, type_n):
          for j in range(i + 1, type_n + 1):
              count += 1
              c_etypes.append((f"n{i}", f"r{count}", f"n{j}"))
      edges = {}
      for etype in c_etypes:
          src_ntype, _, dst_ntype = etype
          arr = spsp.random(
              num_nodes[src_ntype],
              num_nodes[dst_ntype],
              density=0.001,
              format="coo",
              random_state=100,
          )
          edges[etype] = (arr.row, arr.col)
      return dgl.heterograph(edges, num_nodes), [
          ":".join(c_etype) for c_etype in c_etypes
      ]
  
file_path: dgl/tests/tools/test_change_etype_to_canonical_etype.py
imports: import json
  import os
  import tempfile
  import unittest
  from collections import Counter
  import dgl
  import pytest
  from change_etype_to_canonical_etype import convert_conf, is_old_version
  from dgl.distributed import partition_graph
  from scipy import sparse
label_desc: Use image node_id 1 for calling a global function with example usage: create_random_hetero(type_n, node_n) and returns: dgl,  unknown