Instead of reduce, you could use https://docs.python.org/3/library/functions.html#__import__
__import__('functools').reduce
Instead of reduce, you could use https://docs.python.org/3/library/functions.html#__import__