I have to write a code which could process two signals (ECG and respiratory signal) real-time in Python. Specifically, this code should analyze respiration first, find the expiration phase and then process the ECG finding the R-peak. Any helpful suggestion/material/link? I have no idea how to do it. Thank you.