A Robust Moment Closure for General Continuous-time Epidemic Processes