code: def test_length_mistmatch(self):
      lossA = ContrastiveLoss()
      lossB = TripletMarginLoss(0.1)
      self.assertRaises(
          AssertionError,
          lambda: MultipleLosses(losses=[lossA, lossB], weights=[1]),
      )
  
      minerA = MultiSimilarityMiner()
      self.assertRaises(
          AssertionError,
          lambda: MultipleLosses(
              losses=[lossA, lossB],
              weights=[1, 0.2],
              miners=[minerA],
          ),
      )
  
file_path: pytorch-metric-learning/tests/losses/test_multiple_losses.py
imports: import unittest
  import torch
  from pytorch_metric_learning.losses import ContrastiveLoss, MultipleLosses, TripletMarginLoss
  from pytorch_metric_learning.miners import MultiSimilarityMiner
  from ..None import TEST_DEVICE, TEST_DTYPES
  from ..zzz_testing_utils.testing_utils import angle_to_coord
label_desc: Use image node_id 4 for calling the TestMultipleLosses obj's underlying member method code with example usage: obj.test_length_mistmatch() without return types