def METHOD_NAME(data: str):
    # first determine whether the data contains ALL_END
    # anything after ALL_END is dropped
    all_done = False
    idx = data.find(ALL_END)
    if idx >= 0:
        data = data[:idx]
        all_done = True
    # find lines separated by LINE_END
    parts = data.split(LINE_END)
    return parts, all_done