Python/Flask web application to return different HTTP status codes with latencies on some path