async def METHOD_NAME(request: web.Request):
    """Returns the stats of some addresses."""
    addresses: List[str] = request.query.getall("addresses[]", [])
    session_factory: DbSessionFactory = request.app["session_factory"]
    with session_factory() as session:
        stats = get_message_stats_by_address(session=session, addresses=addresses)
    stats_dict = make_stats_dict(stats)
    output = {"data": stats_dict}
    return web.json_response(output, dumps=lambda v: json.dumps(v))