code: def flattened_nested_key_indices(nested_dict):
      """
      Combine the outer and inner keys of nested dictionaries into a single
      ordering.
      """
      outer_keys, inner_keys = collect_nested_keys(nested_dict)
      combined_keys = list(sorted(set(outer_keys + inner_keys)))
      return {k: i for (i, k) in enumerate(combined_keys)}
  
imports: from collections import defaultdict
  import numpy
  from scipy.sparse import dok_matrix
label_desc: Use image node_id 4 for calling a global function with example usage: flattened_nested_key_indices(nested_dict) and returns: unknown