code: def test_dist_mining(self):
      for dtype in TEST_DTYPES:
          embeddings = (
              torch.arange(9).type(dtype).unsqueeze(1).to(TEST_DEVICE)
          )
          for miner in self.gt.keys():
              cfg = self.gt[miner]
              miner = cfg["miner"]
              a1, p, a2, n = miner.mine(
                  embeddings, self.labels, embeddings, self.labels
              )
              self.helper(a1, p, a2, n, cfg["expected"])
              if WITH_COLLECT_STATS:
                  self.assertTrue(
                      miner.easiest_triplet == cfg["easiest_triplet"]
                  )
                  self.assertTrue(
                      miner.hardest_triplet == cfg["hardest_triplet"]
                  )
                  self.assertTrue(
                      miner.easiest_pos_pair == cfg["easiest_pos_pair"]
                  )
                  self.assertTrue(
                      miner.hardest_pos_pair == cfg["hardest_pos_pair"]
                  )
                  self.assertTrue(
                      miner.easiest_neg_pair == cfg["easiest_neg_pair"]
                  )
                  self.assertTrue(
                      miner.hardest_neg_pair == cfg["hardest_neg_pair"]
                  )
  
file_path: pytorch-metric-learning/tests/miners/test_batch_easy_hard_miner.py
imports: import unittest
  import torch
  from pytorch_metric_learning.distances import LpDistance
  from pytorch_metric_learning.miners import BatchEasyHardMiner
  from pytorch_metric_learning.utils import loss_and_miner_utils
  from ..None import TEST_DEVICE, TEST_DTYPES, WITH_COLLECT_STATS
label_desc: Use image node_id 2 for calling the TestBatchEasyHardMiner obj's underlying member method code with example usage: obj.test_dist_mining() without return types