def all_paths_nodes(paths, steps, keep_last=True):
    """Get all possible anonymous walks of length up to steps, 
	using node labels
	
	"""
    new_paths = []
    last_step_paths = [[0]]
    for i in range(1, steps + 1):
        current_step_paths = []
        for j in range(i + 1):
            for walks in last_step_paths:
                if j <= max(walks) + 1:
                    new_paths.append(walks + [j])
                    current_step_paths.append(walks + [j])
        last_step_paths = current_step_paths
    if keep_last:
        new_paths = last_step_paths
    paths[steps] = new_paths
    return new_paths
