code: def test_expecting_success_and_device(self):
      metric = FBetaScore()
      y_pred = torch.tensor(
          [[1, 1, 1], [1, 1, 1], [1, 1, 1]], device=_device
      )
      y = torch.tensor(
          [[1, 0, 1], [0, 1, 0], [1, 0, 1]], device=_device
      )
      metric(y_pred=y_pred, y=y)
      result = metric.aggregate()[0]
      assert_allclose(
          result, torch.Tensor([0.714286]), atol=1e-6, rtol=1e-6
      )
      np.testing.assert_equal(result.device, y_pred.device)
  
file_path: MONAI/tests/test_compute_f_beta.py
imports: from __future__ import annotations
  import unittest
  import numpy
  import torch
  from monai.metrics import FBetaScore
  from tests.utils import assert_allclose
label_desc: Use image node_id 1 for calling the TestFBetaScore obj's underlying member method code with example usage: obj.test_expecting_success_and_device() without return types