def _collect_params(param_generator, info):
    """Collects all output of the given coroutine into a single list."""
    params = []
    while True:
        param = param_generator.send(info)
        if param is None:
            return params
        params.append(param)