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):
      """
      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: from collections import namedtuple
  from dataclasses import asdict, dataclass
  import torch
  from mmf.utils.general import retry_n
  from omegaconf import OmegaConf
  from packaging import version
  from torch import nn
label_desc: Use image node_id 3 for calling the ViTModel obj's underlying member method code with example usage: obj._prune_heads(heads_to_prune) without return types