code: def test_perfect_scores(self, device: str):
      self._send_tensors_to_device(device)
  
      self.scorer(
          self.predictions,
          self.label_predictions,
          self.gold_indices,
          self.gold_labels,
          self.mask,
      )
  
      for value in self.scorer.get_metric().values():
          assert value == 1.0
  
file_path: allennlp/tests/training/metrics/attachment_scores_test.py
imports: from typing import Any, Dict, List, Tuple, Union
  import torch
  from allennlp.common.testing import AllenNlpTestCase, multi_device, run_distributed_test, global_distributed_metric
  from allennlp.training.metrics import AttachmentScores
label_desc: Use image node_id 3 for calling the AttachmentScoresTest obj's underlying member method code with example usage: obj.test_perfect_scores(device) without return types