def writeIslands(locIslByNodeD, islandOutFN):
    """Write the islands to a file"""
    with open(islandOutFN, 'w') as f:
        for branch in locIslByNodeD.keys():
            for island in locIslByNodeD[branch]:
                print(island.fileStr(), file=f)
    return
