Legendgroup with sublist

I see that you can make legendgroups or keep all your traces as individual legend elements. Is it possible to combine them so I can either toggle by group or individual?

I’m imaging the legend would look like this:

◻︎Group A
☑︎Group B
☒Group C

Is this possible?

Not at the moment unfortunately