def parse_splits(chunk_lines):
    """
    Parse splits from a chunk_lines (as list) and return
    a list of splits.

    :param chunk_lines: list

    Note:
    -----
    Assume split infos have 3 lines where a line which starts
    with 'S' begin split infos and the next 2 lines begin with '$'
    and 'E' in that order.
    """

    split = {}
    splits = []

    for index, line in enumerate(chunk_lines):
        prefix = line[0]
        data = line[1:]

        if prefix == 'S': split["category"] = data
        elif prefix == 'E': split["memo"] = data
        elif prefix == '$':
            split["amount"] = data
            splits.append(split)
            split = {}
        else:
            continue

    return splits