Why don't you just put this whole function inside the `compute_J3_HN_HA`? It only has 3 lines of logic and it's only called in one place