def set_id(node_label, old_id, new_id):
    """Generate a subquery to set new id for the node."""
    query = (
        "MATCH (n:{} {{id : '{}'}})\n".format(node_label, old_id) +
        "SET n.id = '{}'".format(new_id)
    )
    return query