code: def __init__(
      self,
      net,
      output_dim,
      projection_hidden_size,
      projection_num_layers,
      layer=-2,
  ):
      super().__init__()
      self.net = net
      self.layer = layer
  
      self.view_projector = None
      self.region_projector = None
      self.projection_hidden_size = projection_hidden_size
      self.projection_num_layers = projection_num_layers
      self.output_dim = output_dim
  
      self.hidden = {}
      self.hook_registered = False
  
imports: import copy
  import random
  from functools import wraps, partial
  import torch
  from torch import nn, einsum
  import torch.nn.functional
  from torchvision import transforms
  from einops import rearrange, reduce, repeat
label_desc: Use image node_id 1 to create a new NetWrapper object from inherited base classes: nn with example: obj = NetWrapper(net, output_dim, projection_hidden_size, projection_num_layers, layer)