docstr: Adds a biaffine dependency parsing head on top of the model. The parsing head uses the architecture described
  in "Is Supervised Syntactic Parsing Beneficial for Language Understanding? An Empirical Investigation" (Glavaš
  & Vulić, 2021) (https://arxiv.org/pdf/2008.06788.pdf).
  
  Args:
      head_name (str): The name of the head.
      num_labels (int, optional): Number of labels. Defaults to 2.
      overwrite_ok (bool, optional): Force overwrite if a head with the same name exists. Defaults to False.
      id2label (dict, optional): Mapping from label ids to labels. Defaults to None.
docstr_tok: ["Adds","a","biaffine","dependency","parsing","head","on","top","of","the","model",".","The","parsing","head","uses","the","architecture","described","in","``","Is","Supervised","Syntactic","Parsing","Beneficial","for","Language","Understanding","?","An","Empirical","Investigation","''","(","Glava\u0161","&","Vuli\u0107",",","2021",")","(","https",":","\/\/arxiv.org\/pdf\/2008.06788.pdf",")",".","Args",":","head_name","(","str",")",":","The","name","of","the","head",".","num_labels","(","int",",","optional",")",":","Number","of","labels",".","Defaults","to","2.","overwrite_ok","(","bool",",","optional",")",":","Force","overwrite","if","a","head","with","the","same","name","exists",".","Defaults","to","False",".","id2label","(","dict",",","optional",")",":","Mapping","from","label","ids","to","labels",".","Defaults","to","None","."]
code: def add_dependency_parsing_head(
      self, head_name, num_labels=2, overwrite_ok=False, id2label=None
  ):
      """
      Adds a biaffine dependency parsing head on top of the model. The parsing head uses the architecture described
      in "Is Supervised Syntactic Parsing Beneficial for Language Understanding? An Empirical Investigation" (Glavaš
      & Vulić, 2021) (https://arxiv.org/pdf/2008.06788.pdf).
  
      Args:
          head_name (str): The name of the head.
          num_labels (int, optional): Number of labels. Defaults to 2.
          overwrite_ok (bool, optional): Force overwrite if a head with the same name exists. Defaults to False.
          id2label (dict, optional): Mapping from label ids to labels. Defaults to None.
      """
      head = BiaffineParsingHead(self, head_name, num_labels, id2label)
      self.add_prediction_head(head, overwrite_ok)
  
file_path: adapters/src/adapters/models/electra/adapter_model.py
imports: from transformers.models.electra.modeling_electra import ELECTRA_INPUTS_DOCSTRING, ELECTRA_START_DOCSTRING, ElectraModel, ElectraPreTrainedModel
  from transformers.utils import add_start_docstrings, add_start_docstrings_to_model_forward
  from ...context import AdapterSetup
  from ...heads import BertStyleMaskedLMHead, BiaffineParsingHead, CausalLMHead, ClassificationHead, ModelWithFlexibleHeadsAdaptersMixin, MultiLabelClassificationHead, MultipleChoiceHead, QuestionAnsweringHead, TaggingHead
  from ...model_mixin import EmbeddingAdaptersWrapperMixin
  from ...wrappers import init
label_desc: Use image node_id 8 for calling the ElectraAdapterModel obj's underlying member method code with example usage: obj.add_dependency_parsing_head(head_name, num_labels, overwrite_ok, id2label) without return types