'Mark the iterator as valid according to *is_valid* (which must
be either a Python boolean or a LLVM inst).'

def set_valid(self, is_valid=True):

    if (is_valid in (False, True)):
        is_valid = self._context.get_constant(types.boolean, is_valid)
    self._pairobj.second = is_valid
