'Normalize a path into a sequence of non-recurrent paths
@param path: the path as a list of node IDs'

@staticmethod
def __normalize(path):

    seq = map(str, path)
    l = zip(seq, seq[1:])
    if (not l):
        return [path]
    seq = S3MultiPath.__resolve(seq)
    pop = seq.pop
    paths = []
    append = paths.append
    while len(seq):
        p = pop(0)
        s = (paths + seq)
        contained = False
        lp = len(p)
        for i in s:
            if (i[:lp] == p):
                contained = True
                break
        if (not contained):
            append(p)
    return paths
