def _sort_keys(x):
 keys = list(x.keys())
 idx = np.argsort([str(k) for k in keys])
 keys = [keys[ii] for ii in idx]
 return keys

def _sort_keys ( x ) : keys = list ( x . keys ( ) ) idx = np . argsort ( [ str ( k ) for k in keys ] ) keys = [ keys [ ii ] for ii in idx ] return keys
sort and return keys of dict .