code: def get_indices_tuple(
      labels, ref_labels, embeddings=None, ref_emb=None, miner=None
  ):
      device = labels.device
      curr_batch_idx = torch.arange(len(labels), device=device)
      if miner:
          indices_tuple = miner(embeddings, labels, ref_emb, ref_labels)
      else:
          indices_tuple = lmu.get_all_pairs_indices(labels, ref_labels)
      return lmu.remove_self_comparisons(
          indices_tuple, curr_batch_idx, len(ref_labels)
      )
  
imports: import torch
  from ..losses import BaseMetricLossFunction, CrossBatchMemory
  from ..miners import BaseMiner
  from ..utils import common_functions
  from ..utils import loss_and_miner_utils
label_desc: Use image node_id 6 for calling a global function with example usage: get_indices_tuple(labels, ref_labels, embeddings, ref_emb, miner) and returns: lmu