def imports(operators=None, union=True):
    from enaml.core.import_hooks import imports
    if operators is None:
        return imports()

    from contextlib import contextmanager
    from enaml.core.operators import operator_context

    @contextmanager
    def imports_context():
        with imports():
            with operator_context(operators, union):
                yield

    return imports_context()
Lazily imports and returns an enaml imports context.
dataset/ETHPy150Open ContinuumIO/ashiba/enaml/enaml/__init__.py/imports