Remove reduce calls for python3.