code: def forward_cross_batch(
      self,
      emb,
      labels,
      indices_tuple,
      ref_emb,
      ref_labels,
      world_size,
      enqueue_mask,
  ):
      if ref_emb is not None or ref_labels is not None:
          raise ValueError(
              "CrossBatchMemory is not compatible with ref_emb and ref_labels"
          )
  
      if world_size <= 1:
          return self.loss(emb, labels, indices_tuple, enqueue_mask)
  
      all_emb, all_labels, _, _, _ = gather_emb_and_ref(
          emb, labels, ref_emb, ref_labels
      )
      enqueue_mask = gather_enqueue_mask(enqueue_mask, emb.device)
      loss = self.loss(all_emb, all_labels, indices_tuple, enqueue_mask)
      return loss * world_size
  
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 4 for calling the DistributedLossWrapper obj's underlying member method code with example usage: obj.forward_cross_batch(emb, labels, indices_tuple, ref_emb, ref_labels, world_size, enqueue_mask) and returns: unknown, self