Obviously this is super specific to the two operations at hand, but found it interesting to rubber duck with the ChatGPT - would have never thought about this otherwise. PS! ChatGPT is still struggling to solve it (probably bc my instructions are bad though :))