# Define the filter function def filter_log_data(line, important_words): for word in important_words: if word in line: return True return False