python: remove red blocks