code: def test_fbeta_multiclass_state(self, device: str):
      self.predictions = self.predictions.to(device)
      self.targets = self.targets.to(device)
  
      fbeta = FBetaMeasure()
      fbeta(self.predictions, self.targets)
  
      # check state
      assert_allclose(fbeta._pred_sum.tolist(), self.pred_sum)
      assert_allclose(fbeta._true_sum.tolist(), self.true_sum)
      assert_allclose(
          fbeta._true_positive_sum.tolist(), self.true_positive_sum
      )
      assert_allclose(
          fbeta._true_negative_sum.tolist(), self.true_negative_sum
      )
      assert_allclose(fbeta._total_sum.tolist(), self.total_sum)
  
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 4 for calling the FBetaMeasureTest obj's underlying member method code with example usage: obj.test_fbeta_multiclass_state(device) without return types