code: def test_key_mismatch(self):
      lossA = ContrastiveLoss()
      lossB = TripletMarginLoss(0.1)
      self.assertRaises(
          AssertionError,
          lambda: MultipleLosses(
              losses={"lossA": lossA, "lossB": lossB},
              weights={"blah": 1, "lossB": 0.23},
          ),
      )
  
      minerA = MultiSimilarityMiner()
      self.assertRaises(
          AssertionError,
          lambda: MultipleLosses(
              losses={"lossA": lossA, "lossB": lossB},
              weights={"lossA": 1, "lossB": 0.23},
              miners={"blah": 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 3 for calling the TestMultipleLosses obj's underlying member method code with example usage: obj.test_key_mismatch() without return types