'Record the node\'s era and discard the ``NodeState`` if it doesn\'t
match the era.'

def update_cluster_state(self, cluster_state):

    if (cluster_state.node_uuid_to_era.get(self.uuid) != self.era):
        cluster_state = cluster_state.remove_node(self.uuid)
    cluster_state = cluster_state.transform(['node_uuid_to_era', self.uuid], self.era)
    return cluster_state
