code: def test_empty_output(self):
      batch_size = 32
      for dtype in TEST_DTYPES:
          embeddings = (
              torch.randn(batch_size, 64).type(dtype).to(TEST_DEVICE)
          )
          labels = torch.arange(batch_size)
          for miner in [
              self.dist_miner,
              self.normalized_dist_miner,
              self.normalized_dist_miner_squared,
              self.sim_miner,
          ]:
              a, p, n = miner(embeddings, labels)
              self.assertTrue(len(a) == 0)
              self.assertTrue(len(p) == 0)
              self.assertTrue(len(n) == 0)
  
              if WITH_COLLECT_STATS:
                  self.assertTrue(miner.hardest_pos_pair == 0)
                  self.assertTrue(miner.hardest_neg_pair == 0)
                  self.assertTrue(miner.hardest_triplet == 0)
  
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 8 for calling the TestBatchHardMiner obj's underlying member method code with example usage: obj.test_empty_output() without return types