code: def apply(module, name, bound):
      fn = SpectralNorm(name, bound)
  
      weight = getattr(module, name)
      del module._parameters[name]
      module.register_parameter(name + "_orig", weight)
      input_size = weight.size(0)
      u = weight.new_empty(input_size).normal_()
      module.register_buffer(name, weight)
      module.register_buffer(name + "_u", u)
  
      module.register_forward_pre_hook(fn)
  
      return fn
  
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 3 for calling the SpectralNorm obj's underlying member method code with example usage: obj.apply(module, name, bound) and returns: fn