I need some help to develop a script where a set of BREPS can be split in halves, then rotate each half so they become back to back. Currently I'm working with a set of 17 stacked boxes but I'd need the script to work for any arrangement of the boxes.