I'm pretty sure any of the SODAQ example codes can be used for any network. Just be sure to set the correct settings.
Make sure you set the connection type: LTE-M or NB-IOT. I only know a way of doing this with AT-commands myself. AT+URAT=7 for LTE-M or AT+URAT=8 for NB-IOT.
After that you can use AT+CGDCONT=1,"IP", "" to select your APN.
And set the correct operator numbr using AT+COPS=1,2,"".
That's the only way I know currently for KPN and LTE-M.