Form of AMENDED AND RESTATED CUSTODY AGREEMENT