code: def concatenate(cls, overlay):
          
          if not isinstance(overlay, NdOverlay):
              raise ValueError('Only NdOverlays can be concatenated')
          xarr = xr.concat([v.data.transpose() for v in overlay.values()],
                           pd.Index(overlay.keys(), name=overlay.kdims[0].name))
          params = dict(get_param_values(overlay.last),
                        vdims=overlay.last.vdims,
                        kdims=overlay.kdims+overlay.last.kdims)
          return Dataset(xarr.transpose(), datatype=['xarray'], **params)
docs: Concatenates an NdOverlay of Image types into a single 3D
          xarray Dataset.