code: def generate_convs(
      hetero_graph, conv, hidden_size, first_layer=False
  ):
      convs = {}
      for message_type in hetero_graph.message_types:
          if first_layer is True:
              src_type = message_type[0]
              dst_type = message_type[2]
              src_size = hetero_graph.num_node_features(src_type)
              dst_size = hetero_graph.num_node_features(dst_type)
              convs[message_type] = conv(
                  src_size,
                  hidden_size,
                  dst_size,
                  remove_self_loop=False,
              )
          else:
              convs[message_type] = conv(
                  hidden_size,
                  hidden_size,
                  hidden_size,
                  remove_self_loop=False,
              )
      return convs
  
imports: import copy
  import torch
  import argparse
  import deepsnap
  import numpy
  import torch.nn
  import torch.nn.functional
  import torch_geometric.nn
  from sklearn.metrics import f1_score
  from deepsnap.hetero_gnn import forward_op, HeteroSAGEConv
  from deepsnap.hetero_graph import HeteroGraph
  from torch_sparse import SparseTensor, matmul
label_desc: Use image node_id 2 for calling a global function with example usage: generate_convs(hetero_graph, conv, hidden_size, first_layer) and returns: convs