Implement kl_divergence_estimator(pi_theta: np.ndarray, pi_ref: np.ndarray) -> np.ndarray, the per-sample KL penalty used in GRPO.
pi_theta[i] is the current policy's probability of sample 's action and pi_ref[i] the reference policy's. Both arrays have the same shape and entries in .Return an array of the same shape with one estimate per sample; do not sum or average over samples.