Finalize interleave_data logic and update doc tests