def _apply_missings(self, res, include_missing=False):
        """Return ndarray with missing and insertions as specified.

        The return value is the result of the following operations on *res*,
        which is a raw cube value array (raw meaning it has shape of original
        cube response).

        * Remove vectors (rows/cols) for missing elements if *include_missin*
          is False.


        Note that it does *not* include pruning.
        """
        # --element idxs that satisfy `include_missing` arg. Note this
        # --includes MR_CAT elements so is essentially all-or-valid-elements
        element_idxs = tuple(
            (
                d.all_elements.element_idxs
                if include_missing
                else d.valid_elements.element_idxs
            )
            for d in self._all_dimensions
        )
        return res[np.ix_(*element_idxs)] if element_idxs else res
Return ndarray with missing and insertions as specified.

        The return value is the result of the following operations on *res*,
        which is a raw cube value array (raw meaning it has shape of original
        cube response).

        * Remove vectors (rows/cols) for missing elements if *include_missin*
          is False.


        Note that it does *not* include pruning.