def get_row_generator(self, ref, cache=None):

        """Return a row generator for a reference"""
        from inspect import isgenerator
        from rowgenerators import get_generator

        g = get_generator(ref)

        if not g:
            raise GenerateError("Cant figure out how to generate rows from {} ref: {}".format(type(ref), ref))
        else:
            return g
Return a row generator for a reference