from typing import Tuple


def process_response(res: dict) -> Tuple[str, list]:
    """Get the scroll id and hits from the response of an elasticsearch search query.

    :param res: The response.
    :return: scroll id and hits
    """
    scroll_id = res["_scroll_id"]
    # flatten nested dictionary '_source'
    for hit in res["hits"]["hits"]:
        source = hit.pop("_source")
        for k, v in source.items():
            hit[k] = v
    hits = res["hits"]["hits"]
    return scroll_id, hits