tfg.rendering.utils.merge_batch_dims

Merges all dimensions into one starting from 0 till last_axis exluding.