code: def test_message_stack(self):
      relative_path = "../.."
  
      error = None
      try:
          p = Porcupine(
              access_key="invalid",
              library_path=pv_library_path(relative_path),
              model_path=get_model_path_by_language(
                  relative_path, "en"
              ),
              keyword_paths=get_keyword_paths_by_language(
                  relative_path, "en", ["porcupine"]
              ),
              sensitivities=[0.5],
          )
          self.assertIsNone(p)
      except PorcupineError as e:
          error = e.message_stack
  
      self.assertIsNotNone(error)
      self.assertGreater(len(error), 0)
  
      try:
          p = Porcupine(
              access_key="invalid",
              library_path=pv_library_path(relative_path),
              model_path=get_model_path_by_language(
                  relative_path, "en"
              ),
              keyword_paths=get_keyword_paths_by_language(
                  relative_path, "en", ["porcupine"]
              ),
              sensitivities=[0.5],
          )
          self.assertIsNone(p)
      except PorcupineError as e:
          self.assertEqual(len(error), len(e.message_stack))
          self.assertListEqual(list(error), list(e.message_stack))
  
file_path: porcupine/binding/python/test_porcupine.py
imports: import sys
  import unittest
  from parameterized import parameterized
  from _porcupine import Porcupine, PorcupineError
  from test_util import *
label_desc: Use image node_id 5 for calling the PorcupineTestCase obj's underlying member method code with example usage: obj.test_message_stack() without return types