MAINT: move a likelihood-related function from the sampling module to the mjp module