def dfs(node, all_nodes, depth):
    node.depth = depth
    to_return = [node,]
    for subnode in all_nodes:
        if subnode.parent and subnode.parent.id == node.id:
            to_return.extend(dfs(subnode, all_nodes, depth+1))
    return to_return
read/write of 3D NMRPipe time domain first slice.
dataset/ETHPy150Open caseywstark/colab/colab/apps/threadedcomments/models.py/dfs--crossover with--dataset/ETHPy150Open jjhelmus/nmrglue/nmrglue/fileio/tests/test_pipe.py/test_3d_time_slice