I’ve added the solution I came up with to the Github issue linked in the original post above. Hope it’s helpful.