code: def test_dist_mining(self):
      for dtype in TEST_DTYPES:
          embeddings = (
              torch.arange(9).type(dtype).unsqueeze(1).to(TEST_DEVICE)
          )
          a, p, n = self.dist_miner(embeddings, self.labels)
          self.helper(a, p, n)
          if WITH_COLLECT_STATS:
              self.assertTrue(self.dist_miner.hardest_pos_pair == 6)
              self.assertTrue(self.dist_miner.hardest_neg_pair == 1)
  
file_path: pytorch-metric-learning/tests/miners/test_batch_hard_miner.py
imports: import unittest
  import numpy
  import torch
  from pytorch_metric_learning.distances import CosineSimilarity, LpDistance
  from pytorch_metric_learning.miners import BatchHardMiner
  from ..None import TEST_DEVICE, TEST_DTYPES, WITH_COLLECT_STATS
  from ..zzz_testing_utils.testing_utils import angle_to_coord
label_desc: Use image node_id 3 for calling the TestBatchHardMiner obj's underlying member method code with example usage: obj.test_dist_mining() without return types