code: def test_tied_distances(self):
      # Embeddings with different labels colocated.
      # The "skip first index" approach might remove the wrong item.
      # So this is to test that the correct item is removed.
      emb = torch.tensor([[10], [10], [20], [20]])
      labels = torch.tensor([1, 0, 1, 0])
      AC = accuracy_calculator.AccuracyCalculator(
          include=("precision_at_1",)
      )
      accuracies = AC.get_accuracy(emb, labels)
      self.assertEqual(accuracies["precision_at_1"], 0)
  
imports: import itertools
  import logging
  import unittest
  import numpy
  import torch
  from pytorch_metric_learning.distances import LpDistance
  from pytorch_metric_learning.utils import accuracy_calculator
  from pytorch_metric_learning.utils.common_functions import LOGGER
  from pytorch_metric_learning.utils.inference import CustomKNN, FaissKMeans, FaissKNN
  from ..None import TEST_DEVICE
label_desc: Use image node_id 1 for calling the TestEmbeddingsComeFromSameSource obj's underlying member method code with example usage: obj.test_tied_distances() without return types