'Fetch the unsorted query results for multiple queries at once.
In the case of precomputed queries, do an extra lookup first to
determine which row key to find the latest precomputed values for the
query in.'

@classmethod
def _fetch_multi(self, queries):

    by_model = collections.defaultdict(list)
    for q in queries:
        by_model[q.model].append(q)
    cached_queries = {}
    for (model, queries) in by_model.iteritems():
        (pure, need_mangling) = ([], [])
        for q in queries:
            if (not q.is_precomputed):
                pure.append(q.key)
            else:
                need_mangling.append(q.key)
        mangled = model.index_mangle_keys(need_mangling)
        fetched = model.get((pure + mangled.keys()))
        for (key, values) in fetched.iteritems():
            key = mangled.get(key, key)
            cached_queries[key] = values
    for q in queries:
        cached_query = cached_queries.get(q.key)
        if cached_query:
            (q.data, q.timestamps) = cached_query
