Create a group and assign entities programmatically