factory.py: add global docstring