code: def test_query_within_reference(self):
      query = torch.tensor([0, 10, 20]).unsqueeze(1)
      ref = torch.tensor([0, 5, 10, 15, 20]).unsqueeze(1)
      query_labels = torch.tensor([0, 1, 2])
      ref_labels = torch.tensor([0, 9, 1, 8, 2])
      AC = accuracy_calculator.AccuracyCalculator(
          include=("precision_at_1",)
      )
  
      # should work with False
      AC.get_accuracy(query, query_labels, ref, ref_labels, False)
  
      # query != ref[:len(query)]
      with self.assertRaises(ValueError):
          AC.get_accuracy(query, query_labels, ref, ref_labels, True)
  
      # query == ref[:len(query)]
      ref = torch.tensor([0, 10, 20, 5, 15]).unsqueeze(1)
      ref_labels[:3] = query_labels
      AC.get_accuracy(query, query_labels, ref, ref_labels, True)
  
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 3 for calling the TestEmbeddingsComeFromSameSource obj's underlying member method code with example usage: obj.test_query_within_reference() without return types