def zero_broadcast_dimensions(lol, nblocks):
    f = lambda t: (t[0],) + tuple(0 if d == 1 else i for i, d in zip(t[1:], nblocks))
    return deepmap(f, lol)
>>> lol = [('x', 1, 0), ('x', 1, 1), ('x', 1, 2)]
dataset/ETHPy150Open dask/dask/dask/array/core.py/zero_broadcast_dimensions