code: def _write(self, session, openFile, replaceParamFile):
          
          # Retrieve output locations
          locations = self.outputLocations
  
          # Write lines
          openFile.write('%s\n' % self.numLocations)
  
          for location in locations:
              openFile.write('%s %s\n' % (location.linkOrCellI,
                                          location.nodeOrCellJ))
docs: Generic Output Location Write to File Method