How to determine if there is segment between 2 spline points?

I’m struggling to find a way to determine if a segment between 2 point in spline exists.
I know that there are methods like bpy.ops.curve.delete(type='SEGMENT') and bpy.ops.curve.make_segment() from here but there is no way to read this data.
Can anyone give me a hint?

One curve object can have many splines.
If spline points indices are sequential they share a segment. And if a spline is cyclic then last index and first index share a segment.

wow, the answer turned out to be so simple. Shame that I haven’t guessed it myself. Thanks a lot :slight_smile: