code: def test_key_prediction_to_label_function(self):
      self.assertEqual(
          key_prediction_to_label(sample_key_act), "Ab major"
      )
      self.assertEqual(
          key_prediction_to_label(sample_key_act[0]), "Ab major"
      )
      self.assertEqual(
          key_prediction_to_label(np.roll(sample_key_act[0], 1)),
          "A minor",
      )
      self.assertEqual(
          key_prediction_to_label(np.roll(sample_key_act[0], -3)),
          "F major",
      )
  
      self.assertEqual(
          key_prediction_to_label(sample2_key_act), "A minor"
      )
      self.assertEqual(
          key_prediction_to_label(sample2_key_act[0]), "A minor"
      )
      self.assertEqual(
          key_prediction_to_label(np.roll(sample2_key_act[0], 1)),
          "Bb minor",
      )
      self.assertEqual(
          key_prediction_to_label(np.roll(sample2_key_act[0], -3)),
          "F# major",
      )
  
file_path: madmom/tests/test_features_key.py
imports: from __future__ import absolute_import, division, print_function
  import unittest
  from os.path import join
  from madmom.features import Activations
  from madmom.features.key import *
  from .None import AUDIO_PATH, ACTIVATIONS_PATH
label_desc: Use image node_id 1 for calling the TestHelperFunctions obj's underlying member method code with example usage: obj.test_key_prediction_to_label_function() without return types