code: def test_value_error(self, arguments, image, method):
      if method == "__init__":
          self.assertRaises(ValueError, DetectEnvelope, **arguments)
      elif method == "__call__":
          self.assertRaises(
              ValueError, DetectEnvelope(**arguments), image
          )
      else:
          raise ValueError(
              "Expected raising method invalid. Should be __init__ or __call__."
          )
  
file_path: MONAI/tests/test_detect_envelope.py
imports: from __future__ import annotations
  import unittest
  import numpy
  import torch
  from parameterized import parameterized
  from monai.transforms import DetectEnvelope
  from monai.utils import OptionalImportError
  from tests.utils import TEST_NDARRAYS, SkipIfModule, SkipIfNoModule, assert_allclose
label_desc: Use image node_id 2 for calling the TestDetectEnvelope obj's underlying member method code with example usage: obj.test_value_error(arguments, image, method) without return types