code: def __init__(
      self,
      vit,
      device=None,
      layer=None,
      layer_name="transformer",
      layer_save_input=False,
      return_embeddings_only=False,
      detach=True,
  ):
      super().__init__()
      self.vit = vit
  
      self.data = None
      self.latents = None
      self.hooks = []
      self.hook_registered = False
      self.ejected = False
      self.device = device
  
      self.layer = layer
      self.layer_name = layer_name
      self.layer_save_input = (
          layer_save_input  # whether to save input or output of layer
      )
      self.return_embeddings_only = return_embeddings_only
  
      self.detach_fn = clone_and_detach if detach else identity
  
file_path: vit-pytorch/vit_pytorch/extractor.py
imports: import torch
  from torch import nn
label_desc: Use image node_id 1 to create a new Extractor object from inherited base classes: nn with example: obj = Extractor(vit, device, layer, layer_name, layer_save_input, return_embeddings_only, detach)