code: def _test_f_metric(case, beta=1):
      gt, pr, res = case
      gt = _to_4d(gt)
      pr = _to_4d(pr)
      f_score = FScore(beta=beta, smooth=10e-12)
      score = keras.backend.eval(f_score(gt, pr))
      assert np.allclose(score, res)
  
file_path: segmentation_models/tests/test_metrics.py
imports: import pytest
  import numpy
  import segmentation_models
  from segmentation_models.metrics import IOUScore, FScore
  from segmentation_models.losses import JaccardLoss, DiceLoss
label_desc: Use image node_id 5 for calling a global function with example usage: _test_f_metric(case, beta) without return types