code: def test_cosine_distance_self(x1):
      expected_output = torch.tensor(
          [[1.0000, 0.9746], [0.9746, 1.0000]]
      )
      output = calculate_distance(x1, metric=DistanceMetric.COSINE)
      assert torch.allclose(
          output, expected_output, rtol=1e-3, atol=1e-3
      )
  
file_path: pykale/tests/utils/test_distance.py
imports: import pytest
  import torch
  from kale.utils.distance import calculate_distance, DistanceMetric
label_desc: Use image node_id 4 for calling a global function with example usage: test_cosine_distance_self(x1) without return types