Helper for prepare_transformation_recipe().
This function expands each relevant ellipsis ast node in-place into a
sequence of NamedAxisAstNode nodes, where each node will have
a name like "...1", "...2", etc. and an empty src list.
Also does some further validation of the ellipses syntax using ndim.
expand_ellipsis(einops_ast, ndim)an expanded EinopsAst with ellipses expanded
an EinopsAst
integer. Number of dimensions in the input tensor