Scientists develop artificial intelligence system to detect cardiac arrest in sleep