def make_native_dict_keys(d):
    """Convert all keys to native `str` type (recursively)."""
    res = {}
    for k, v in d.items():  #
        k = compat.to_native(k)
        if type(v) is dict:
            v = make_native_dict_keys(v)
        res[k] = v
    return res
Convert all keys to native `str` type (recursively).