code: function wrapPartsIntoGroups(parts, indexes) {
    if (indexes.length === 0) {
      return parts;
    }
  
    let lastEnd = 0;
  
    return indexes.reduce((accumulator, index) => {
      const { start, end, alignment, before, after } = index;
      const printedPartsForGrouping = concat([
        before || "",
        concat(parts.slice(start, end)),
        after || ""
      ]);
      const newArray = accumulator.concat(
        parts.slice(lastEnd, start),
        alignment
          ? dedentToRoot(
              group(
                concat([
                  align(new Array(alignment).join(" "), printedPartsForGrouping)
                ])
              )
            )
          : group(printedPartsForGrouping),
        end === parts.length - 1 ? parts.slice(end) : ""
      );
  
      lastEnd = end;
  
      return newArray;
    }, []);
  }
docs: Wrap parts into groups by indexes. It is require to have same indent on lines for all parts into group. The value of `alignment` option indicates how many spaces must be before each part.  Example: <div> <?php echo '1'; echo '2'; echo '3'; ?> </div>