I think we a docstring explaining what this does and why we do it that way. I can write it if you like.