code: def test_fbeta_multiclass_macro_average_metric(self, device: str):
      self.predictions = self.predictions.to(device)
      self.targets = self.targets.to(device)
  
      fbeta = FBetaVerboseMeasure()
      fbeta(self.predictions, self.targets)
      metric = fbeta.get_metric()
      precisions = metric["macro-precision"]
      recalls = metric["macro-recall"]
      fscores = metric["macro-fscore"]
  
      # compute desired values with sklearn
      num_labels = self.predictions.size(1)
      labels = np.arange(num_labels)
      (
          macro_precision,
          macro_recall,
          macro_fscore,
          _,
      ) = precision_recall_fscore_support(
          self.targets.cpu().numpy(),
          self.predictions.argmax(dim=1).cpu().numpy(),
          average="macro",
          labels=labels,  # necessary to consider missing labels from 'true' and 'pred'
      )
  
      # check values
      assert_allclose(precisions, macro_precision)
      assert_allclose(recalls, macro_recall)
      assert_allclose(fscores, macro_fscore)
  
      # check type
      assert isinstance(precisions, float)
      assert isinstance(recalls, float)
      assert isinstance(fscores, float)
  
imports: from typing import Any, Dict, List, Tuple, Union
  import torch
  import numpy
  from sklearn.metrics import precision_recall_fscore_support
  from torch.testing import assert_allclose
  import pytest
  from allennlp.common.checks import ConfigurationError
  from allennlp.common.testing import AllenNlpTestCase, multi_device, run_distributed_test, global_distributed_metric
  from allennlp.training.metrics import FBetaVerboseMeasure
label_desc: Use image node_id 7 for calling the FBetaVerboseMeasureTest obj's underlying member method code with example usage: obj.test_fbeta_multiclass_macro_average_metric(device) without return types