code: def test_ill_shape(self):
      loss = LocalNormalizedCrossCorrelationLoss(spatial_dims=3)
      # spatial_dims unmatch
      with self.assertRaisesRegex(ValueError, ""):
          loss.forward(
              torch.ones(
                  (1, 3, 3, 3), dtype=torch.float, device=device
              ),
              torch.ones(
                  (1, 3, 3, 3), dtype=torch.float, device=device
              ),
          )
      # pred, target shape unmatch
      with self.assertRaisesRegex(ValueError, ""):
          loss.forward(
              torch.ones(
                  (1, 3, 3, 3, 3), dtype=torch.float, device=device
              ),
              torch.ones(
                  (1, 3, 4, 4, 4), dtype=torch.float, device=device
              ),
          )
  
file_path: MONAI/tests/test_local_normalized_cross_correlation_loss.py
imports: from __future__ import annotations
  import unittest
  import numpy
  import torch
  from parameterized import parameterized
  from monai.losses.image_dissimilarity import LocalNormalizedCrossCorrelationLoss
label_desc: Use image node_id 2 for calling the TestLocalNormalizedCrossCorrelationLoss obj's underlying member method code with example usage: obj.test_ill_shape() without return types