docstr: Prunes heads of the model. heads_to_prune: dict of {layer_num: list of heads to prune in this layer} See base
  class PreTrainedModel
docstr_tok: ["Prunes","heads","of","the","model",".","heads_to_prune",":","dict","of","{","layer_num",":","list","of","heads","to","prune","in","this","layer","}","See","base","class","PreTrainedModel"]
code: def _prune_heads(self, heads_to_prune: Dict[int, List[int]]) -> None:
      """
      Prunes heads of the model. heads_to_prune: dict of {layer_num: list of heads to prune in this layer} See base
      class PreTrainedModel
      """
      for layer, heads in heads_to_prune.items():
          self.encoder.layer[layer].attention.prune_heads(heads)
  
imports: import collections.abc
  import math
  from typing import Dict, List, Optional, Set, Tuple, Union
  import torch
  import torch.utils.checkpoint
  from torch import nn
  from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss
  from ...activations import ACT2FN
  from ...modeling_outputs import BaseModelOutput, BaseModelOutputWithPooling, ImageClassifierOutput
  from ...modeling_utils import PreTrainedModel
  from ...pytorch_utils import find_pruneable_heads_and_indices, prune_linear_layer
  from ...utils import add_code_sample_docstrings, add_start_docstrings, add_start_docstrings_to_model_forward, logging
  from ..auto import AutoBackbone
  from .configuration_vit_hybrid import ViTHybridConfig
label_desc: Use image node_id 3 for calling the ViTHybridModel obj's underlying member method code with example usage: obj._prune_heads(heads_to_prune) without return types