def set_privilege(self, name, value=None):
        """Configures the user privilege value in EOS

        Args:
            name (str): The name of the user to craete

            value (int): The privilege value to assign to the user.  Valid
                values are in the range of 0 to 15

        Returns:
            True if the operation was successful otherwise False

        Raises:
            TypeError: if the value is not in the valid range
        """
        cmd = 'username %s' % name
        if value is not None:
            if not isprivilege(value):
                raise TypeError('priviledge value must be between 0 and 15')
            cmd += ' privilege %s' % value
        else:
            cmd += ' privilege 1'
        return self.configure(cmd)