def unpack_singleton(x):
    while isinstance(x, (list, tuple)):
        try:
            x = x[0]
        except (IndexError, TypeError, KeyError):
            break
    return x
Test set of iterables
dataset/ETHPy150Open dask/dask/dask/array/core.py/unpack_singleton--crossover with--dataset/ETHPy150Open wrobstory/vincent/tests/test_vega.py/TestData.test_from_mult_iters