@contextmanager
    def nested(*contexts):
        with ExitStack() as stack:
            yield tuple(stack.enter_context(c) for c in contexts)
Emulation of contextlib.nested in terms of ExitStack
dataset/ETHPy150Open tbielawa/bitmath/tests/test_query_device_capacity.py/nested