def group_exists(self, group_name):
        '''
        Returns :data:`True` if the given group exist, :data:`False` otherwise.

        :param group_name: Name of the group to verify.
        :type group_name: :class:`str`
        :return: Whether the group exists or not.
        :rtype: :class:`bool`

        Example:
        ::

            class MySampleRole(Role):
                def provision(self):
                    with self.using(UserRole) as role:
                        if role.group_exists('usersgroup'):
                            pass
        '''
        values = self.__first_values_from('group')
        return group_name in values
dataset/ETHPy150Open python-provy/provy/provy/more/debian/users/user.py/UserRole.group_exists/original