code: def generate_simple_hete_dataset(add_edge_type=True):
      G = nx.DiGraph()
      node_label_options = [0, 1, 2]
      for i in range(9):
          node_label = random.choice(node_label_options)
          if i < 2:
              node_feature = torch.rand(
                  [
                      10,
                  ]
              )
              node_type = "n1"
          elif 2 <= i < 4:
              node_feature = torch.rand(
                  [
                      12,
                  ]
              )
              node_type = "n2"
          elif 4 <= i < 6:
              node_feature = torch.rand(
                  [
                      10,
                  ]
              )
              node_type = "n1"
          else:
              node_feature = torch.rand(
                  [
                      12,
                  ]
              )
              node_type = "n2"
  
          G.add_node(
              i,
              node_type=node_type,
              node_label=node_label,
              node_feature=node_feature,
          )
      if add_edge_type:
          G.add_edge(
              0,
              1,
              edge_feature=torch.rand(
                  [
                      8,
                  ]
              ),
              edge_type="e1",
          )
          G.add_edge(
              0,
              2,
              edge_feature=torch.rand(
                  [
                      12,
                  ]
              ),
              edge_type="e2",
          )
          G.add_edge(
              0,
              5,
              edge_feature=torch.rand(
                  [
                      8,
                  ]
              ),
              edge_type="e1",
          )
          G.add_edge(
              1,
              3,
              edge_feature=torch.rand(
                  [
                      12,
                  ]
              ),
              edge_type="e2",
          )
          G.add_edge(
              1,
              5,
              edge_feature=torch.rand(
                  [
                      12,
                  ]
              ),
              edge_type="e2",
          )
          G.add_edge(
              2,
              3,
              edge_feature=torch.rand(
                  [
                      8,
                  ]
              ),
              edge_type="e1",
          )
          G.add_edge(
              2,
              4,
              edge_feature=torch.rand(
                  [
                      12,
                  ]
              ),
              edge_type="e2",
          )
          G.add_edge(
              3,
              4,
              edge_feature=torch.rand(
                  [
                      12,
                  ]
              ),
              edge_type="e2",
          )
          G.add_edge(
              4,
              0,
              edge_feature=torch.rand(
                  [
                      12,
                  ]
              ),
              edge_type="e2",
          )
          G.add_edge(
              4,
              5,
              edge_feature=torch.rand(
                  [
                      8,
                  ]
              ),
              edge_type="e1",
          )
          G.add_edge(
              5,
              7,
              edge_feature=torch.rand(
                  [
                      8,
                  ]
              ),
              edge_type="e1",
          )
          G.add_edge(
              6,
              1,
              edge_feature=torch.rand(
                  [
                      8,
                  ]
              ),
              edge_type="e1",
          )
          G.add_edge(
              6,
              2,
              edge_feature=torch.rand(
                  [
                      8,
                  ]
              ),
              edge_type="e1",
          )
          G.add_edge(
              7,
              3,
              edge_feature=torch.rand(
                  [
                      8,
                  ]
              ),
              edge_type="e1",
          )
          G.add_edge(
              8,
              0,
              edge_feature=torch.rand(
                  [
                      12,
                  ]
              ),
              edge_type="e2",
          )
          G.add_edge(
              8,
              1,
              edge_feature=torch.rand(
                  [
                      12,
                  ]
              ),
              edge_type="e2",
          )
      else:
          G.add_edge(
              0,
              1,
              edge_feature=torch.rand(
                  [
                      8,
                  ]
              ),
          )
          G.add_edge(
              0,
              2,
              edge_feature=torch.rand(
                  [
                      8,
                  ]
              ),
          )
          G.add_edge(
              0,
              5,
              edge_feature=torch.rand(
                  [
                      8,
                  ]
              ),
          )
          G.add_edge(
              1,
              3,
              edge_feature=torch.rand(
                  [
                      8,
                  ]
              ),
          )
          G.add_edge(
              1,
              5,
              edge_feature=torch.rand(
                  [
                      8,
                  ]
              ),
          )
          G.add_edge(
              2,
              3,
              edge_feature=torch.rand(
                  [
                      8,
                  ]
              ),
          )
          G.add_edge(
              2,
              4,
              edge_feature=torch.rand(
                  [
                      8,
                  ]
              ),
          )
          G.add_edge(
              3,
              4,
              edge_feature=torch.rand(
                  [
                      8,
                  ]
              ),
          )
          G.add_edge(
              4,
              0,
              edge_feature=torch.rand(
                  [
                      8,
                  ]
              ),
          )
          G.add_edge(
              4,
              5,
              edge_feature=torch.rand(
                  [
                      8,
                  ]
              ),
          )
          G.add_edge(
              5,
              7,
              edge_feature=torch.rand(
                  [
                      8,
                  ]
              ),
          )
          G.add_edge(
              6,
              1,
              edge_feature=torch.rand(
                  [
                      8,
                  ]
              ),
          )
          G.add_edge(
              6,
              2,
              edge_feature=torch.rand(
                  [
                      8,
                  ]
              ),
          )
          G.add_edge(
              7,
              3,
              edge_feature=torch.rand(
                  [
                      8,
                  ]
              ),
          )
          G.add_edge(
              8,
              0,
              edge_feature=torch.rand(
                  [
                      8,
                  ]
              ),
          )
          G.add_edge(
              8,
              1,
              edge_feature=torch.rand(
                  [
                      8,
                  ]
              ),
          )
      return G
  
imports: import numpy
  import networkx
  import random
  import torch
  import itertools
label_desc: Use image node_id 14 for calling a global function with example usage: generate_simple_hete_dataset(add_edge_type) and returns: G