            # Determine where this drive is in the tree.
            if j == 0:
                # root element
                heritage = [[name, j]]
            elif j == heritage[len(heritage) - 1][1] + 1:
                # child of last element
                heritage.append([name, j])
            elif j < heritage[len(heritage) - 1][1]:
                # this is an aunt, but not a root
                heritage = heritage[:j - 1]
            else: