code: def to_adjacency_matrix(adj):
      """
      adj : torch.Tensor [2,E]
      return Tensor [N,N]
      """
      num_nodes = adj.max().item() + 1
      mat = torch.zeros((num_nodes, num_nodes), dtype=bool)
      mat[tuple(adj)] = 1
      return mat
  
file_path: AutoGL/autogl/module/preprocessing/structure_engineering/_structure_engineer.py
imports: from ..None import _data_preprocessor
  import torch
  from ....utils import get_logger
label_desc: Use image node_id 4 for calling a global function with example usage: to_adjacency_matrix(adj) and returns: mat