Human In The Loop Middleware Python