'Convert tuple output to lists (internal).'

def convert_to_lists(self, res, formatted=0, as_utf8=0):

    nres = []
    needs_formatting = self.needs_formatting(res, formatted)
    for r in res:
        nr = []
        for c in r:
            if needs_formatting:
                val = self.convert_to_simple_type(c, formatted)
            else:
                val = c
            if (as_utf8 and (type(val) is text_type)):
                val = val.encode(u'utf-8')
            nr.append(val)
        nres.append(nr)
    return nres
