code: def _test_score_ddp_fn(
      rank, world_size, preds, targets, exact_match, f1
  ):
      """Core functionality for the `test_score_ddp` test."""
      _squad_score_ddp(
          rank,
          world_size,
          preds[rank],
          targets[rank],
          exact_match[rank],
          f1[rank],
      )
  
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 4 for calling a global function with example usage: _test_score_ddp_fn(rank, world_size, preds, targets, exact_match, f1) without return types