def get_taf_flight_rules(lines: [dict]) -> [dict]:  
for i, line in enumerate(lines):<EOL><INDENT>temp_vis, temp_cloud = line['<STR_LIT>'], line['<STR_LIT>']<EOL>for report in reversed(lines[:i]):<EOL><INDENT>if not _is_tempo_or_prob(report['<STR_LIT:type>']):<EOL><INDENT>if temp_vis == '<STR_LIT>':<EOL><INDENT>temp_vis = report['<STR_LIT>']<EOL><DEDENT>if '<STR_LIT>' in report['<STR_LIT>'] or '<STR_LIT>' in report['<STR_LIT>']:<EOL><INDENT>temp_cloud = '<STR_LIT>'<EOL><DEDENT>elif temp_cloud == []:<EOL><INDENT>temp_cloud = report['<STR_LIT>']<EOL><DEDENT>if temp_vis != '<STR_LIT>' and temp_cloud != []:<EOL><INDENT>break<EOL><DEDENT><DEDENT><DEDENT>if temp_cloud == '<STR_LIT>':<EOL><INDENT>temp_cloud = []<EOL><DEDENT>line['<STR_LIT>'] = FLIGHT_RULES[get_flight_rules(temp_vis, get_ceiling(temp_cloud))]<EOL><DEDENT>return lines<EOL>
Get flight rules by looking for missing data in prior reports