code: def test_precision_case(metric_functional, sk_fn):
      """Test that metrics are robust towars cases where high precision is needed."""
      x = torch.tensor([[772.0, 112.0], [772.20001, 112.0]])
      res1 = metric_functional(x, zero_diagonal=False)
      res2 = sk_fn(x)
      assert torch.allclose(
          res1, torch.tensor(res2, dtype=torch.float32)
      )
  
file_path: torchmetrics/tests/unittests/pairwise/test_pairwise_distance.py
imports: from functools import partial
  from typing import NamedTuple
  import pytest
  import torch
  from sklearn.metrics.pairwise import cosine_similarity, euclidean_distances, linear_kernel, manhattan_distances, pairwise_distances
  from torch import Tensor
  from torchmetrics.functional import pairwise_cosine_similarity, pairwise_euclidean_distance, pairwise_linear_similarity, pairwise_manhattan_distance, pairwise_minkowski_distance
  from unittests import BATCH_SIZE, NUM_BATCHES
  from unittests.helpers import seed_all
  from unittests.helpers.testers import MetricTester
label_desc: Use image node_id 3 for calling a global function with example usage: test_precision_case(metric_functional, sk_fn) without return types