code: def mine(self, embeddings, labels, ref_emb, ref_labels):
      mat = self.distance(embeddings, ref_emb)
      self.set_idx(labels, ref_labels)
  
      for name, (anchor, other) in {
          "pos": (self.a1, self.p),
          "neg": (self.a2, self.n),
      }.items():
          if len(anchor) > 0:
              pairs = mat[anchor, other]
              num_pairs = len(pairs)
              k = int(math.ceil(self.filter_percentage * num_pairs))
              largest = self.should_select_largest(name)
              _, idx = torch.topk(pairs, k=k, largest=largest)
              self.filter_original_indices(name, idx)
  
      return self.a1, self.p, self.a2, self.n
  
file_path: pytorch-metric-learning/src/pytorch_metric_learning/miners/hdc_miner.py
imports: import math
  import torch
  from ..utils import loss_and_miner_utils
  from .base_miner import BaseMiner
label_desc: Use image node_id 2 for calling the HDCMiner obj's underlying member method code with example usage: obj.mine(embeddings, labels, ref_emb, ref_labels) and returns: self,  self,  self,  self