def predict_fault(alarm_text): if "power" in alarm_text.lower(): return "Inspect power supply and battery backup" elif "signal" in alarm_text.lower(): return "Check fiber links and transmission modules" elif "configuration" in alarm_text.lower(): return "Review device configurations" elif "hardware" in alarm_text.lower(): return "Replace or troubleshoot the faulty hardware" elif "reboot" in alarm_text.lower(): return "Check logs for abnormal reboots or crashes" else: return "Perform general diagnostics"