Country Portfolios Solution

Does anyone know how (have an example mod file) to use Dynare to solve Open Economy Macro Models with portfolio choice? I am referring to the higher order appox technique as in, for example, Devereux and Sutherland (2009). I found the following Dynare wiki page on it but it is not very intelligible (at least to me): dynare.org/DynareWiki/PortfolioModels

Any help appreciated