class_docstr: based on allennlp.training.metrics.AttachmentScores
  Computes labeled and unlabeled attachment scores for a dependency parse. Note that the input
  to this metric is the sampled predictions, not the distribution itself.
code: def __init__(self):
      self._labeled_correct = 0.0
      self._unlabeled_correct = 0.0
      self._total_words = 0.0
  
imports: import collections
  import logging
  import os
  from dataclasses import dataclass, field
  from typing import Callable, Dict, List, Optional, Tuple, Union
  import numpy
  import torch
  from torch.utils.data import DataLoader
  from torch.utils.data.dataset import Dataset
  from tqdm import tqdm
  from adapters import AdapterTrainer
  from transformers import DataCollator, EvalPrediction, PreTrainedModel, PreTrainedTokenizerBase, Trainer, TrainerCallback, TrainingArguments, is_torch_tpu_available
  from transformers.trainer_utils import PredictionOutput
label_desc: Use image node_id 1 to create a new ParsingMetric object from inherited base classes: Metric with example: obj = ParsingMetric()