code: def test_score_fn(preds, targets, exact_match, f1):
      """Tests for functional."""
      metrics_score = squad(preds, targets)
      _assert_tensor(metrics_score["exact_match"])
      _assert_tensor(metrics_score["f1"])
      _assert_allclose(metrics_score["exact_match"], exact_match)
      _assert_allclose(metrics_score["f1"], f1)
  
file_path: torchmetrics/tests/unittests/text/test_squad.py
imports: import os
  import pytest
  import torch
  import torch.distributed
  import torch.multiprocessing
  from torchmetrics.functional.text import squad
  from torchmetrics.text.squad import SQuAD
  from unittests.helpers.testers import _assert_allclose, _assert_tensor
  from unittests.text.inputs import _inputs_squad_batch_match, _inputs_squad_exact_match, _inputs_squad_exact_mismatch
label_desc: Use image node_id 1 for calling a global function with example usage: test_score_fn(preds, targets, exact_match, f1) without return types