code: def setUpClass(self):
      self.dist_miner = BatchHardMiner(
          distance=LpDistance(normalize_embeddings=False)
      )
      self.normalized_dist_miner = BatchHardMiner(
          distance=LpDistance(normalize_embeddings=True)
      )
      self.normalized_dist_miner_squared = BatchHardMiner(
          distance=LpDistance(normalize_embeddings=True, power=2)
      )
      self.sim_miner = BatchHardMiner(distance=CosineSimilarity())
      self.labels = torch.LongTensor([0, 0, 1, 1, 0, 2, 1, 1, 1])
      self.correct_a = torch.LongTensor([0, 1, 2, 3, 4, 6, 7, 8]).to(
          TEST_DEVICE
      )
      self.correct_p = torch.LongTensor([4, 4, 8, 8, 0, 2, 2, 2]).to(
          TEST_DEVICE
      )
      self.correct_n = [
          torch.LongTensor([2, 2, 1, 4, 3, 5, 5, 5]).to(TEST_DEVICE),
          torch.LongTensor([2, 2, 1, 4, 5, 5, 5, 5]).to(TEST_DEVICE),
      ]
  
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 1 for calling the TestBatchHardMiner obj's underlying member method code with example usage: obj.setUpClass() without return types