Create group when install package

Hello.
How can I create a group when will install a package?
That is, in the package there will normal application and a daemon that should work with an ordinary user when its administrator adds already to the created group.

The question is how to do it right?
If this should be written in snapcraft.yaml, I will be grateful for an example.
thx

Can it delete a group at the time of package removal?

neither works yet … see: