def find_position(string, index, line_offset):
    """Given a string and index, return (line, column)"""
    leading = string[:index].splitlines()
    return len(leading) + line_offset, len(leading[-1]) + 1
