def METHOD_NAME(self):
    loss_funcA = ContrastiveLoss()
    loss_funcB = ContrastiveLoss(distance=CosineSimilarity())
    for dtype in TEST_DTYPES:
        for loss_func in [loss_funcA, loss_funcB]:
            embedding_angles = [0]
            embeddings = torch.tensor(
                [testing_utils.angle_to_coord(a) for a in embedding_angles],
                requires_grad=True,
                dtype=dtype,
            ).to(
                TEST_DEVICE
            )  # 2D embeddings
            labels = torch.LongTensor([0])
            loss = loss_func(embeddings, labels)
            loss.backward()