code: def test_score_ddp(preds, targets, exact_match, f1):
      """Tests for metric using DDP."""
      world_size = 2
      mp.spawn(
          _test_score_ddp_fn,
          args=(world_size, preds, targets, exact_match, f1),
          nprocs=world_size,
          join=False,
      )
  
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 5 for calling a global function with example usage: test_score_ddp(preds, targets, exact_match, f1) without return types