code: def test_error(self, params, input_data):
      with self.assertRaises(ValueError):
          FlattenSubKeysd(**params)(input_data)
  
file_path: MONAI/tests/test_flatten_sub_keysd.py
imports: from __future__ import annotations
  import unittest
  import torch
  from parameterized import parameterized
  from monai.transforms import FlattenSubKeysd
label_desc: Use image node_id 2 for calling the TestFlattenSubKeysd obj's underlying member method code with example usage: obj.test_error(params, input_data) without return types