AMENDMENT NUMBER SEVEN to the AMENDED AND RESTATED MASTER REPURCHASE AGREEMENT Dated as of March 3, 2017, by and among PENNYMAC LOAN SERVICES, LLC, PENNYMAC HOLDINGS, LLC, PENNYMAC CORP. and CITIBANK, N.A.