code: def forward(
      self, embeddings, labels, indices_tuple=None, enqueue_mask=None
  ):
      if indices_tuple is not None and enqueue_mask is not None:
          raise ValueError(
              "indices_tuple and enqueue_mask are mutually exclusive"
          )
      if enqueue_mask is not None:
          assert len(enqueue_mask) == len(embeddings)
      else:
          assert len(embeddings) <= len(self.embedding_memory)
      self.reset_stats()
      device = embeddings.device
      labels = c_f.to_device(labels, device=device)
      self.embedding_memory = c_f.to_device(
          self.embedding_memory, device=device, dtype=embeddings.dtype
      )
      self.label_memory = c_f.to_device(
          self.label_memory, device=device, dtype=labels.dtype
      )
  
      if enqueue_mask is not None:
          emb_for_queue = embeddings[enqueue_mask]
          labels_for_queue = labels[enqueue_mask]
          embeddings = embeddings[~enqueue_mask]
          labels = labels[~enqueue_mask]
          do_remove_self_comparisons = False
      else:
          emb_for_queue = embeddings
          labels_for_queue = labels
          do_remove_self_comparisons = True
  
      queue_batch_size = len(emb_for_queue)
      self.add_to_memory(
          emb_for_queue, labels_for_queue, queue_batch_size
      )
  
      if not self.has_been_filled:
          E_mem = self.embedding_memory[: self.queue_idx]
          L_mem = self.label_memory[: self.queue_idx]
      else:
          E_mem = self.embedding_memory
          L_mem = self.label_memory
  
      indices_tuple = self.create_indices_tuple(
          embeddings,
          labels,
          E_mem,
          L_mem,
          indices_tuple,
          do_remove_self_comparisons,
      )
      loss = self.loss(embeddings, labels, indices_tuple, E_mem, L_mem)
      return loss
  
file_path: pytorch-metric-learning/src/pytorch_metric_learning/losses/cross_batch_memory.py
imports: import torch
  from ..utils import common_functions
  from ..utils import loss_and_miner_utils
  from ..utils.module_with_records import ModuleWithRecords
  from .base_loss_wrapper import BaseLossWrapper
label_desc: Use image node_id 4 for calling the CrossBatchMemory obj's underlying member method code with example usage: obj.forward(embeddings, labels, indices_tuple, enqueue_mask) and returns: loss