Is there a handy solution to incorporate CVA and DVA when valuing an Interest Rate Swap given the PDs and LGDs of the counterparties to the swap. In case an example of an Interest Rate swap is needed can you consider the following example;
http://gouthamanbalaraman.com/blog/interest-rate-swap-quantlib-python.html