code: def WN_transform(graph, G, num_edge_types, input_dim=5):
      edge_feature = []
      edge_label = []
      for u, v, edge_key in G.edges:
          l = G[u][v][edge_key]["e_label"]
          e_feat = [0.0] * num_edge_types
          e_feat[l] = 1.0
          edge_feature.append(e_feat)
          edge_label.append(l)
      edge_feature = torch.tensor(edge_feature, dtype=torch.float32)
      edge_label = torch.tensor(edge_label, dtype=torch.int64)
      graph.edge_feature = edge_feature
      graph.edge_label = edge_label
      return graph
  
imports: import copy
  import time
  import argparse
  import torch
  import torch.nn
  import torch.nn.functional
  import networkx
  import numpy
  import sklearn.metrics
  import torch_geometric.nn
  from torch.utils.data import DataLoader
  from deepsnap.dataset import GraphDataset
  from deepsnap.batch import Batch
  from deepsnap.graph import Graph
label_desc: Use image node_id 2 for calling a global function with example usage: WN_transform(graph, G, num_edge_types, input_dim) and returns: graph