def changes_existing_nodes(nodes_exist, alpha, dict_proj, dict_proj_changed_exist):
    """
    For nodes that are in both sequential snapshots, update their embedding by their current embedding and new
    calculated embedding. Do it only for those that their neighbours are changed.
    :param nodes_exist: Nodes that exist in both sequential snapshots and their neighbours are changed
    :param alpha: Parameter representing the importance that is given to the old embedding
    :param dict_proj: Dictionary of embeddings of the nodes
    :param dict_proj_changed_exist: Dict of previous embedding of the changed existing nodes.
    :return: An updated embedding dictionary
    """
    for node in nodes_exist:
        if dict_proj.get(node) is not None:
            new_proj = dict_proj[node]
            old_proj = dict_proj_changed_exist[node]
            final_proj = alpha * old_proj + (1 - alpha) * new_proj
            dict_proj[node] = final_proj
    return dict_proj