code: def add_to_memory(self, embeddings, labels, batch_size):
      self.curr_batch_idx = (
          torch.arange(
              self.queue_idx,
              self.queue_idx + batch_size,
              device=labels.device,
          )
          % self.memory_size
      )
      self.embedding_memory[self.curr_batch_idx] = embeddings.detach()
      self.label_memory[self.curr_batch_idx] = labels.detach()
      prev_queue_idx = self.queue_idx
      self.queue_idx = (self.queue_idx + batch_size) % self.memory_size
      if (not self.has_been_filled) and (
          self.queue_idx <= prev_queue_idx
      ):
          self.has_been_filled = True
  
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 5 for calling the CrossBatchMemory obj's underlying member method code with example usage: obj.add_to_memory(embeddings, labels, batch_size) without return types