code: def test_transpose_nested_dictionary():
      d = {"a": {"b": 20, "c": 50}, "c": {"q": 500}}
      transposed = transpose_nested_dictionary(d)
      eq_(set(transposed.keys()), {"b", "c", "q"})
      eq_(transposed["q"], {"c": 500})
      eq_(transposed["c"], {"a": 50})
      eq_(transposed["b"], {"a": 20})
  
file_path: fancyimpute/test/test_dictionary_helpers.py
imports: import numpy
  from fancyimpute.dictionary_helpers import dense_matrix_from_pair_dictionary, dense_matrix_from_nested_dictionary, reverse_lookup_from_nested_dict, transpose_nested_dictionary
  from nose.tools import eq_
label_desc: Use image node_id 6 for calling a global function with example usage: test_transpose_nested_dictionary() without return types