code: def test_dense_matrix_from_nested_dictionary_square():
      d = {"a": {"b": 10}, "b": {"c": 20}}
      X, rows, columns = dense_matrix_from_nested_dictionary(
          d, square_result=True
      )
      eq_(rows, ["a", "b", "c"])
      eq_(columns, ["a", "b", "c"])
      assert np.isnan(X[0, 0])
      eq_(X[0, 1], 10)
      assert np.isnan(X[0, 2])
      assert np.isnan(X[1, 0])
      assert np.isnan(X[1, 1])
      eq_(X[1, 2], 20)
      assert np.isnan(X[2, 0])
      assert np.isnan(X[2, 1])
      assert np.isnan(X[2, 2])
  
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 2 for calling a global function with example usage: test_dense_matrix_from_nested_dictionary_square() without return types