def rename_dict_keys(dct: dict, key_dict: dict):
    """
    Rename dictionary keys using a `key_dict` mapping.
    """
    for k, v in key_dict.items():
        if k in dct.keys():
            dct[v] = dct.pop(k)

    return dct