Yes, as I mentioned in previous comment, I just iterated over dictionary keys, where I removed the iter and next methods. I managed to solve this problem. But after this, I am not able to set num_workers=8, it only works for num_workers=1. When I set it to 8, I get the IndexError.  See this 2 for details. I guess I should close this ticket if it’s possible. I’ll check if I can do that.