We require a function that expands and collapses sidpy.dataset objects. For instance, the need to collapse spatial dimensions and/or spectral dimensions when undertaking matrix or tensor factorization, deep learning, etc. It should allow the user to specify which dimensions over which to do the collapsing either by name, index, or dimension type. The details of this collapse should be stored in the dataset as a __ attribute (so it is hidden from the user).