code: def decode_dict_keys(d, coding="utf-8"):
      
      assert compat.PY2
      res = {}
      for k, v in d.items():  #
          if type(k) is str:
              k = k.decode(coding)
          if type(v) is dict:
              v = decode_dict_keys(v, coding)
          res[k] = v
      return res
docs: Convert all keys to unicde (recursively).