code: def generate_simple_small_hete_graph(directed=True):
      if directed:
          G = nx.DiGraph()
      else:
          G = nx.Graph()
      G.add_node(0, node_label=0, node_type=0)
      G.add_node(1, node_label=1, node_type=0)
      G.add_node(2, node_label=2, node_type=0)
      G.add_node(3, node_label=0, node_type=0)
      G.add_node(4, node_label=1, node_type=1)
      G.add_node(5, node_label=1, node_type=1)
      G.add_node(6, node_label=1, node_type=1)
  
      # message_type (0, 0, 0)
      G.add_edge(0, 1, edge_label=0, edge_type=0)
      G.add_edge(0, 2, edge_label=0, edge_type=0)
      G.add_edge(0, 3, edge_label=0, edge_type=0)
      # message_type (0, 1, 1)
      G.add_edge(0, 4, edge_label=1, edge_type=1)
      G.add_edge(2, 4, edge_label=0, edge_type=1)
      G.add_edge(3, 5, edge_label=0, edge_type=1)
      G.add_edge(3, 6, edge_label=0, edge_type=1)
      # message_type (0, 1, 0)
      G.add_edge(1, 2, edge_label=3, edge_type=1)
      G.add_edge(1, 3, edge_label=3, edge_type=1)
      G.add_edge(2, 3, edge_label=3, edge_type=1)
  
      return G
  
imports: import numpy
  import networkx
  import random
  import torch
  import itertools
label_desc: Use image node_id 12 for calling a global function with example usage: generate_simple_small_hete_graph(directed) and returns: G