def ensure_group(self, group_name, group_id=None):
        '''
        Ensures that a given user group is present in the remote server.

        :param group_name: Name of the group to create.
        :type group_name: :class:`str`
        :param group_id: GID of the group. Defaults to :data:`None`, which assigns the next available GID.
        :type group_id: :class:`int`

        Example:
        ::

            from provy.core import Role
            from provy.more.debian import UserRole

            class MySampleRole(Role):
                def provision(self):
                    with self.using(UserRole) as role:
                        role.ensure_group('users-group')
        '''
        if not self.group_exists(group_name):
            self.log("Group %s not found! Creating..." % group_name)
            if not group_id:
                self.execute('groupadd %s' % group_name, stdout=False, sudo=True)
            else:
                self.execute('groupadd --gid %s %s' % (group_id, group_name), stdout=False, sudo=True)
            self.log(group_name % "Group %s created!")
dataset/ETHPy150Open python-provy/provy/provy/more/debian/users/user.py/UserRole.ensure_group/swapped operands of `%`