'Load a list of iterations from an iteration keyval file.
Keyval data from separate iterations is separated by blank
lines. Makes use of the parse_line_into_dicts method to
actually parse the individual lines.'

@classmethod
def load_from_keyval(cls, keyval_path):

    if (not os.path.exists(keyval_path)):
        return []
    iterations = []
    index = 1
    (attr, perf) = ({}, {})
    for line in file(keyval_path):
        line = line.strip()
        if line:
            cls.parse_line_into_dicts(line, attr, perf)
        else:
            iterations.append(cls(index, attr, perf))
            index += 1
            (attr, perf) = ({}, {})
    if (attr or perf):
        iterations.append(cls(index, attr, perf))
    return iterations
