code: def test_ssl_wrapper_all(self):
      for dtype in TEST_DTYPES:
          for symmetric in [True, False]:
              embeddings = torch.randn(
                  100,
                  256,
                  requires_grad=True,
                  dtype=dtype,
              ).to(TEST_DEVICE)
              embeddings = torch.nn.functional.normalize(embeddings)
  
              ref_emb = torch.randn(
                  100,
                  256,
                  requires_grad=True,
                  dtype=dtype,
              ).to(TEST_DEVICE)
              ref_emb = torch.nn.functional.normalize(ref_emb)
  
              labels = torch.arange(100).to(TEST_DEVICE)
  
              real_losses = self.run_all_loss_fns(
                  embeddings, labels, ref_emb, labels.clone(), symmetric
              )
              losses = self.run_all_loss_fns_wrapped(
                  embeddings, ref_emb, symmetric
              )
  
              atol = 1e-3
              for loss_name, loss_value in losses.items():
                  self.assertTrue(
                      torch.isclose(
                          real_losses[loss_name], loss_value, atol=atol
                      )
                  )
  
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 1 for calling the TestSelfSupervisedLoss obj's underlying member method code with example usage: obj.test_ssl_wrapper_all() without return types