code: def __init__(self, H, in_size, out_size, hidden_dims=16):
      super().__init__()
  
      self.Theta1 = nn.Linear(in_size, hidden_dims)
      self.Theta2 = nn.Linear(hidden_dims, out_size)
      self.dropout = nn.Dropout(0.5)
  
      ###########################################################
      # (HIGHLIGHT) Compute the Laplacian with Sparse Matrix API
      ###########################################################
      d_V = H.sum(1)  # node degree
      d_E = H.sum(0)  # edge degree
      n_edges = d_E.shape[0]
      D_V_invsqrt = dglsp.diag(d_V**-0.5)  # D_V ** (-1/2)
      D_E_inv = dglsp.diag(d_E**-1)  # D_E ** (-1)
      W = dglsp.identity((n_edges, n_edges))
      self.laplacian = D_V_invsqrt @ H @ W @ D_E_inv @ H.T @ D_V_invsqrt
  
file_path: dgl/examples/sparse/hgnn.py
imports: import dgl.sparse
  import torch
  import torch.nn
  import torch.nn.functional
  import tqdm
  from dgl.data import CoraGraphDataset
  from torchmetrics.functional import accuracy
label_desc: Use image node_id 1 to create a new HGNN object from inherited base classes: nn with example: obj = HGNN(H, in_size, out_size, hidden_dims)