def rechunk(ds, **chunks):
    """
    Rechunk a dataset

    Parameters
    ----------
    ds : xarray Dataset
        A dataset to be rechunked
    chunks : dict
        Dictionary of {dim: chunksize}
    """
    return ds.chunk(chunks)