code: def maybe_mine_embeddings(self, embeddings, labels):
      # for both get_all_triplets_indices and mining_funcs
      # we need to clone labels and pass them as ref_labels
      # to ensure triplets are generated between anchors and posnegs
      if "tuple_miner" in self.mining_funcs:
          (anchors_embeddings, posnegs_embeddings) = embeddings
          return self.mining_funcs["tuple_miner"](
              anchors_embeddings,
              labels,
              posnegs_embeddings,
              labels.clone(),
          )
      else:
          labels = labels.to(embeddings[0].device)
          return lmu.get_all_triplets_indices(labels, labels.clone())
  
file_path: pytorch-metric-learning/src/pytorch_metric_learning/trainers/twostream_metric_loss.py
imports: import torch
  from ..utils import common_functions
  from ..utils import loss_and_miner_utils
  from .base_trainer import BaseTrainer
label_desc: Use image node_id 4 for calling the TwoStreamMetricLoss obj's underlying member method code with example usage: obj.maybe_mine_embeddings(embeddings, labels) and returns: self, lmu