class_docstr: Credit: G. Glavaš & I. Vulić Based on paper "Is Supervised Syntactic Parsing Beneficial for Language Understanding?
  An Empirical Investigation" (https://arxiv.org/pdf/2008.06788.pdf)
code: def build(self, model):
      self.biaffine_arcs = Biaffine(
          n_in=model.config.hidden_size, bias_x=True, bias_y=False
      )
      self.biaffine_rels = Biaffine(
          n_in=model.config.hidden_size,
          n_out=self.config["num_labels"],
          bias_x=True,
          bias_y=True,
      )
  
      self.dropout = nn.Dropout(model.config.hidden_dropout_prob)
  
      self.loss_fn = CrossEntropyLoss()
  
      self.train(model.training)
  
imports: from dataclasses import dataclass
  from typing import Optional, Tuple
  import torch
  from torch import nn
  from torch.nn import CrossEntropyLoss
  from transformers.utils import ModelOutput
  from .base import PredictionHead
label_desc: Use image node_id 2 for calling the BiaffineParsingHead obj's underlying member method code with example usage: obj.build(model) without return types