code: def set_stats(self, positive_dists, negative_dists):
      if self.collect_stats:
          with torch.no_grad():
              len_pd = len(positive_dists)
              len_pn = len(negative_dists)
              if (
                  len_pd > 0
                  and len_pn > 0
                  and self.ALL
                  not in [self.pos_strategy, self.neg_strategy]
              ):
                  easiest_triplet_func = self.get_func_for_stats(False)
                  hardest_triplet_func = self.get_func_for_stats(True)
                  self.easiest_triplet = easiest_triplet_func(
                      positive_dists - negative_dists
                  ).item()
                  self.hardest_triplet = hardest_triplet_func(
                      positive_dists - negative_dists
                  ).item()
              if len_pd > 0:
                  easy_pos_func = self.get_func_for_stats(False)
                  hard_pos_func = self.get_func_for_stats(True)
                  self.easiest_pos_pair = easy_pos_func(
                      positive_dists
                  ).item()
                  self.hardest_pos_pair = hard_pos_func(
                      positive_dists
                  ).item()
              if len_pn > 0:
                  easy_neg_func = self.get_func_for_stats(True)
                  hard_neg_func = self.get_func_for_stats(False)
                  self.easiest_neg_pair = easy_neg_func(
                      negative_dists
                  ).item()
                  self.hardest_neg_pair = hard_neg_func(
                      negative_dists
                  ).item()
  
file_path: pytorch-metric-learning/src/pytorch_metric_learning/miners/batch_easy_hard_miner.py
imports: import torch
  from ..utils import common_functions
  from ..utils import loss_and_miner_utils
  from .base_miner import BaseMiner
label_desc: Use image node_id 9 for calling the BatchEasyHardMiner obj's underlying member method code with example usage: obj.set_stats(positive_dists, negative_dists) without return types