def absolute_index_to_line_column(text, index):
    """Given an index in a string text, return the corresponding 0-indexed line
    and column numbers."""
    start_through_index = text[0:index + 1]
    lines = start_through_index.splitlines(True)
    line_index = len(lines) - 1
    target_line = lines[-1]
    column = len(target_line) - 1
    return line_index, column
