code: def preprocess_adj(adj):
      """Preprocessing of adjacency matrix for simple GCN model and conversion to tuple representation."""
      adj = nx.adjacency_matrix(
          nx.from_dict_of_lists(adj)
      )  # return a adjacency matrix of adj ( type is numpy)
      adj_normalized = normalize_adj(adj + sp.eye(adj.shape[0]))  #
      # return sparse_to_tuple(adj_normalized)
      return adj_normalized.todense()
  
file_path: insightface/reconstruction/ostec/external/graphonomy/FaceHairMask/graph.py
imports: import torch
  import numpy
  import networkx
  import scipy.sparse
label_desc: Use image node_id 2 for calling a global function with example usage: preprocess_adj(adj) and returns: adj_normalized