Refactored get_pi_shift.`n` passed as `Ptr<RCP<const Integer>>`