Repository: Project-MONAI/MONAI

Issue:
Lazy resampling integration test failure
**Describe the bug**
```
======================================================================
ERROR: test_training (__main__.IntegrationLazyResampling)
----------------------------------------------------------------------
Traceback (most recent call last):
test case: {'root_dir': '/tmp/tmpsh17fpf7', 'device': 'cuda:0', 'cachedataset': 0, 'readers': (None, None), 'num_workers': 2, 'lazy': False}
----------
Epoch 1/5
1/3, train_loss:0.6714
img2.nii.gz - [65, 19, 3, 22, 35, 67]
img2.nii.gz - [66, 18, 25, 0, 86, 16]
img2.nii.gz - [0, 84, 0, 25, 68, 34]
img2.nii.gz - [84, 0, 0, 25, 34, 68]
2/3, train_loss:0.5815
img1.nii.gz - [38, 46, 86, 14, 8, 19]
img1.nii.gz - [71, 13, 78, 22, 27, 0]
img1.nii.gz - [34, 50, 67, 33, 15, 12]
img1.nii.gz - [76, 8, 88, 12, 27, 0]
3/3, train_loss:0.6870
img0.nii.gz - [53, 31, 100, 0, 15, 12]
img0.nii.gz - [53, 31, 100, 0, 24, 3]
img0.nii.gz - [0, 84, 59, 41, 8, 19]
img0.nii.gz - [0, 84, 100, 0, 0, 27]
----------
Epoch 2/5
1/3, train_loss:0.7074
img1.nii.gz - [0, 84, 100, 0, 16, 11]
img1.nii.gz - [47, 37, 19, 81, 23, 4]
  File "tests/test_integration_lazy_samples.py", line 215, in test_training
    self.train_and_infer(i)
  File "tests/test_integration_lazy_samples.py", line 192, in train_and_infer
    results_expected = run_training_test(
  File "tests/test_integration_lazy_samples.py", line 154, in run_training_test
    invertible, reasons = has_status_keys(batch_data, TraceStatusKeys.PENDING_DURING_APPLY)
TypeError: has_status_keys() missing 1 required positional argument: 'default_msg'

----------------------------------------------------------------------
Ran 1 test in 17.147s

FAILED (errors=1)
```


Discussion:
Hi @atbenmurray ,

Could you please help fix this CI test failure ASAP?

Thanks in advance.

Doing so


Resolving patch:
diff --git a/monai/transforms/utils.py b/monai/transforms/utils.py
--- a/monai/transforms/utils.py
+++ b/monai/transforms/utils.py
@@ -2001,7 +2001,7 @@ def check_applied_operations(entry: list | dict, status_key: str, default_messag
         return []
 
 
-def has_status_keys(data: torch.Tensor, status_key: Any, default_msg: str):
+def has_status_keys(data: torch.Tensor, status_key: Any, default_message: str = "No message provided"):
     """
     Checks whether a given tensor is has a particular status key message on any of its
     applied operations. If it doesn't, it returns the tuple `(False, None)`. If it does
@@ -2021,7 +2021,7 @@ def has_status_keys(data: torch.Tensor, status_key: Any, default_msg: str):
     Args:
         data: a `torch.Tensor` or `MetaTensor` or collections of torch.Tensor or MetaTensor, as described above
         status_key: the status key to look for, from `TraceStatusKeys`
-        default_msg: a default message to use if the status key entry doesn't have a message set
+        default_message: a default message to use if the status key entry doesn't have a message set
 
     Returns:
         A tuple. The first entry is `False` or `True`. The second entry is the status messages that can be used for the
@@ -2031,15 +2031,15 @@ def has_status_keys(data: torch.Tensor, status_key: Any, default_msg: str):
     status_key_occurrences = list()
     if isinstance(data, (list, tuple)):
         for d in data:
-            _, reasons = has_status_keys(d, status_key, default_msg)
+            _, reasons = has_status_keys(d, status_key, default_message)
             if reasons is not None:
                 status_key_occurrences.extend(reasons)
     elif isinstance(data, monai.data.MetaTensor):
         for op in data.applied_operations:
-            status_key_occurrences.extend(check_applied_operations(op, status_key, default_msg))
+            status_key_occurrences.extend(check_applied_operations(op, status_key, default_message))
     elif isinstance(data, dict):
         for d in data.values():
-            _, reasons = has_status_keys(d, status_key, default_msg)
+            _, reasons = has_status_keys(d, status_key, default_message)
             if reasons is not None:
                 status_key_occurrences.extend(reasons)
 


Test patch: