'Returns the line in the file which corresponds to the reported error
location, as well as the line preceding it (if the error did not
occur on the first line), to provide context to the error.'

def _get_error_lines_from_file(self, file_name, line_number):

    target_line = ''
    prev_line = ''
    with open(file_name, 'r') as f:
        lines = f.readlines()
        target_line = lines[line_number]
        if (line_number > 0):
            prev_line = lines[(line_number - 1)]
    return (target_line, prev_line)
