def find_offset(text, call):
    """Takes in a text and function call and finds the start of call within text"""
    text_list = text.split('\n')
    offset = 0
    for l in range(call.lineno - 1):
        # add 1 to account for newline characters
        offset += len(text_list[l]) + 1
    offset += call.col_offset
    return offset