factory.py: add docstring to class set_connect_env