code: def test_load_key_from_file(self):
      key = load_key(join(ANNOTATIONS_PATH, "dummy.key"))
      self.assertEqual(key, "F# minor")
      key = load_key(join(DETECTIONS_PATH, "dummy.key.txt"))
      self.assertEqual(key, "a maj")
      key = load_key(open(join(ANNOTATIONS_PATH, "dummy.key")))
      self.assertEqual(key, "F# minor")
      key = load_key(open(join(DETECTIONS_PATH, "dummy.key.txt")))
      self.assertEqual(key, "a maj")
  
imports: from __future__ import absolute_import, division, print_function
  import unittest
  from os.path import join, join
  from madmom.io import *
  from madmom.io import load_beats, load_key, load_notes, load_onsets, load_tempo
  from tests import ANNOTATIONS_PATH, DETECTIONS_PATH
  from .None import DATA_PATH
label_desc: Use image node_id 1 for calling the TestLoadKeyFunction obj's underlying member method code with example usage: obj.test_load_key_from_file() without return types