anv: anv_entrypoints_gen.py: use reduce function.