Plugin to create labeled selection

I want to create a plugin to generate labeled selections. I can create labeled selections manually but can’t figure out how to do it in a plugin. The “Regular Interval Labels…” plugin only creates “point” labels. Labeled selections have a “start” AND an “end” are great for looping, etc. I’ve looked at the code and it looks like the nyquist plugin return value interface only allows you to create “point” labels, i.e. only a time and label text per each label. Is there a way to create labeled selections?

OS: Linux

Yes. You just need to use two numeric values instead of one.
See: Missing features - Audacity Support
Example:

(list (list 1.0 2.5 "first label") (list 4 5 "second label"))

I guess I must have been looking at an old doc. Thank you I will try it