def user_exists(self, username):
        '''
        Returns :data:`True` if the given user exist, :data:`False` otherwise.

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

        Example:
        ::

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