code: def run_all_loss_fns(
      self, embeddings, labels, ref_emb, ref_labels, symmetric
  ):
      if symmetric:
          embeddings = torch.cat([embeddings, ref_emb], dim=0)
          labels = torch.cat([labels, ref_labels], dim=0)
      loss_fns_list = self.load_valid_loss_fns()
  
      loss_fns = dict()
      for loss_fn in loss_fns_list:
          loss_name = type(loss_fn).__name__
          if symmetric:
              loss_value = loss_fn(embeddings, labels)
          else:
              loss_value = loss_fn(
                  embeddings=embeddings,
                  labels=labels,
                  ref_emb=ref_emb,
                  ref_labels=ref_labels,
              )
          loss_fns[loss_name] = loss_value
  
      return loss_fns
  
file_path: pytorch-metric-learning/tests/losses/test_self_supervised_loss.py
imports: import unittest
  import torch
  import pytorch_metric_learning.losses
  from ..None import TEST_DEVICE, TEST_DTYPES
label_desc: Use image node_id 2 for calling the TestSelfSupervisedLoss obj's underlying member method code with example usage: obj.run_all_loss_fns(embeddings, labels, ref_emb, ref_labels, symmetric) and returns: loss_fns