How to save .seg.nrrd with script?

Version 4.10

What I determined is that I was passing the segmentationNode instead of a list of the segments that make up the segmentationNode.
Does that make sense? I am using a modified version of the slicer case iterator module.