Try to fix error with importing reduce function in different python versions