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: import torch
  from torch import nn
  from torch.nn import CrossEntropyLoss, MSELoss
  from transformers.file_utils import add_start_docstrings, add_start_docstrings_to_model_forward
  from transformers.models.bert.modeling_bert import BERT_INPUTS_DOCSTRING, BERT_START_DOCSTRING, BertEmbeddings, BertLayer, BertPooler, BertPreTrainedModel
label_desc: Use image node_id 5 for calling the DeeBertModel obj's underlying member method code with example usage: obj._prune_heads(heads_to_prune) without return types