Given an iterable ``rows`` that yield data records, and a
        ``mapping`` which is to be applied to them, return a tuple of
        ``data`` (the generated object graph) and ``err``, a validation
        exception if the resulting data did not match the expected schema.

def apply_iter(cls, rows, mapping, resolver, scope=None):
        """ Given an iterable ``rows`` that yield data records, and a
        ``mapping`` which is to be applied to them, return a tuple of
        ``data`` (the generated object graph) and ``err``, a validation
        exception if the resulting data did not match the expected schema. """
        mapper = cls(mapping, resolver, scope=scope)
        for row in rows:
            _, data = mapper.apply(row)
            yield data