code: def test_performance(self):
      relative = "../../"
      language = "en"
      keyword_paths = get_keyword_paths_by_language(
          relative, language, ["porcupine"]
      )
  
      porcupine = Porcupine(
          access_key=self.ACCESS_KEY,
          library_path=pv_library_path(relative),
          model_path=get_model_path_by_language(relative, language),
          keyword_paths=keyword_paths,
          sensitivities=[0.5] * len(keyword_paths),
      )
  
      audio = read_wav_file(
          get_audio_file_by_language(relative, language),
          porcupine.sample_rate,
      )
  
      num_frames = len(audio) // porcupine.frame_length
  
      perf_results = []
      for _ in range(self.NUM_TEST_ITERATIONS):
          proc_time = 0
          for j in range(num_frames):
              frame = audio[
                  j
                  * porcupine.frame_length : (j + 1)
                  * porcupine.frame_length
              ]
              start = time.perf_counter()
              porcupine.process(frame)
              proc_time += time.perf_counter() - start
          perf_results.append(proc_time)
  
      porcupine.delete()
  
      avg_perf = sum(perf_results) / self.NUM_TEST_ITERATIONS
      print("Average performance: %s" % avg_perf)
      self.assertLess(avg_perf, self.PERFORMANCE_THRESHOLD_SEC)
  
file_path: porcupine/binding/python/test_porcupine_perf.py
imports: import sys
  import time
  import unittest
  from _porcupine import Porcupine
  from test_util import *
  from _util import *
label_desc: Use image node_id 1 for calling the PorcupinePerformanceTestCase obj's underlying member method code with example usage: obj.test_performance() without return types