How to convert a model to a segment?

I want to convert a model to a segment.
I tried using the CreateSegmentFromModelNode Function from the slicer.modules.segmentations.logic(). It returns a segment, but how can I then add it to a segmentation?

        modelNode = slicer.util.getNode('Model')
        segmentationNode = slicer.mrmlScene.AddNewNodeByClass('vtkMRMLSegmentationNode', 'CurveSegmentation')

        # Get the segmentation logic
        segmentationLogic = slicer.modules.segmentations.logic()

        # Convert the model to a segment
        segmentID = segmentationLogic.CreateSegmentFromModelNode(modelNode, segmentationNode)