Previously these were all defined as operating on Tensors which is not true in general. These don't serve much now so just inline it and we can extract it out again. PiperOrigin-RevId: 228827011