code: def test_ill_opts(self):
      with self.assertRaisesRegex(ValueError, ""):
          MaskedLoss(loss=[])
  
      dice_loss = DiceLoss(
          include_background=True,
          sigmoid=True,
          smooth_nr=1e-5,
          smooth_dr=1e-5,
      )
      with self.assertRaisesRegex(ValueError, ""):
          masked = MaskedLoss(loss=dice_loss)
          masked(
              input=torch.zeros((3, 1, 2, 2)),
              target=torch.zeros((3, 1, 2, 2)),
              mask=torch.zeros((3, 3, 2, 2)),
          )
      with self.assertRaisesRegex(ValueError, ""):
          masked = MaskedLoss(loss=dice_loss)
          masked(
              input=torch.zeros((3, 3, 2, 2)),
              target=torch.zeros((3, 2, 2, 2)),
              mask=torch.zeros((3, 3, 2, 2)),
          )
  
file_path: MONAI/tests/test_masked_loss.py
imports: from __future__ import annotations
  import unittest
  import numpy
  import torch
  from parameterized import parameterized
  from monai.losses.dice import DiceFocalLoss, DiceLoss
  from monai.losses.spatial_mask import MaskedLoss
  from monai.utils import set_determinism
  from tests.utils import test_script_save
label_desc: Use image node_id 4 for calling the TestMaskedLoss obj's underlying member method code with example usage: obj.test_ill_opts() without return types