code: def curry_pair_dictionary(key_pair_dict, default_value=0.0):
      """
      Transform dictionary from pairs of keys to dict -> dict -> float
      """
      result = defaultdict(dict)
      for (a, b), value in key_pair_dict.items():
          result[a][b] = value
      return result
  
imports: from collections import defaultdict
  import numpy
  from scipy.sparse import dok_matrix
label_desc: Use image node_id 10 for calling a global function with example usage: curry_pair_dictionary(key_pair_dict, default_value) and returns: result