code: def compute_weight(self, module):
      weight = getattr(module, self.name + "_orig")
      u = getattr(module, self.name + "_u")
      size = weight.size()
      weight_mat = weight.contiguous().view(size[0], -1)
  
      with torch.no_grad():
          v = weight_mat.t() @ u
          v = v / v.norm()
          u = weight_mat @ v
          u = u / u.norm()
  
      sigma = u @ weight_mat @ v
  
      if self.bound:
          weight_sn = (
              weight / (sigma + 1e-6) * torch.clamp(sigma, max=1)
          )
  
      else:
          weight_sn = weight / sigma
  
      return weight_sn, u
  
file_path: DIG/dig/ggraph/method/GraphEBM/energy_func.py
imports: import torch
  from torch import nn
  from torch.nn import functional
label_desc: Use image node_id 2 for calling the SpectralNorm obj's underlying member method code with example usage: obj.compute_weight(module) and returns: weight_sn,  u