This doesn't exist at the moment, as people had the wrong ideas about what this would do, and solving the problem properly is more complicated than you might think. In particular, it is quite nontrivial to take into account dimension-dependent identities between tensor monomials. There is ongoing work to get more general purpose algorithms in cadabra which handle this, but all_contractions
does not have the highest priority at the moment.