def draw_lines_on_surf(self, surf):
        """Draw lines on provided surf.

        Used when drawing lines on another surface
        when exporting the node graph to an image file.
        """
        for parent in self.parents:

            parent_center = parent.rect.center
            segment_color = parent.line_color

            for child in parent.children:

                start, end = (parent_center, child.rect.center)

                draw_line(
                    surf,
                    segment_color,
                    parent_center,  # start
                    child.rect.center,  # end
                    4,  # width
                )
Draw lines on provided surf.

        Used when drawing lines on another surface
        when exporting the node graph to an image file.
        
nodezator/graphman/socketparenthood/export.py