code: def test_ill_shape(self):
      loss = GlobalMutualInformationLoss()
      with self.assertRaisesRegex(ValueError, ""):
          loss.forward(
              torch.ones((1, 2), dtype=torch.float),
              torch.ones((1, 3), dtype=torch.float, device=device),
          )
      with self.assertRaisesRegex(ValueError, ""):
          loss.forward(
              torch.ones((1, 3, 3), dtype=torch.float),
              torch.ones((1, 3), dtype=torch.float, device=device),
          )
  
file_path: MONAI/tests/test_global_mutual_information_loss.py
imports: from __future__ import annotations
  import os
  import unittest
  import numpy
  import torch
  from monai import transforms
  from monai.losses.image_dissimilarity import GlobalMutualInformationLoss
  from tests.utils import SkipIfBeforePyTorchVersion, download_url_or_skip_test, skip_if_quick, testing_data_config
label_desc: Use image node_id 1 for calling the TestGlobalMutualInformationLossIll obj's underlying member method code with example usage: obj.test_ill_shape() without return types