code: def test_fbeta_multiclass_with_explicit_labels(self, device: str):
      self.predictions = self.predictions.to(device)
      self.targets = self.targets.to(device)
  
      # same prediction but with and explicit label ordering
      fbeta = FBetaMeasure(labels=[4, 3, 2, 1, 0])
      fbeta(self.predictions, self.targets)
      metric = fbeta.get_metric()
      precisions = metric["precision"]
      recalls = metric["recall"]
      fscores = metric["fscore"]
  
      desired_precisions = self.desired_precisions[::-1]
      desired_recalls = self.desired_recalls[::-1]
      desired_fscores = self.desired_fscores[::-1]
      # check value
      assert_allclose(precisions, desired_precisions)
      assert_allclose(recalls, desired_recalls)
      assert_allclose(fscores, desired_fscores)
  
imports: from typing import Any, Dict, List, Tuple, Union
  import torch
  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 FBetaMeasure
label_desc: Use image node_id 9 for calling the FBetaMeasureTest obj's underlying member method code with example usage: obj.test_fbeta_multiclass_with_explicit_labels(device) without return types