split_dimensions_left_right function

Split variables into chunks