def merge_jsons(jsons):
    """Merge JSONS returned from api.API.retrieve_pages.

    Args:
      jsons (list[dict]): Having the form:
    {"query":
    {
      "normalized": [
        {
          "from": "",
          "to": "",
        },
      ],

      "redirects": [
        {
          "from": "",
          "to": "",
        }
      ],

      "pages": {
        "id": {
          ...
        },
      }
    }
    }
    Output: the same, just merged and without the "query" wrapper.

    Does not remove duplicates in "normalized" and "redirects".
    """
    end_json = {
        "normalized": [],
        "redirects": [],
        "pages": {},
    }
    for json in jsons:
        json = json["query"]
        if "normalized" in json:
            end_json["normalized"].extend(json["normalized"])
        if "redirects" in json:
            end_json["redirects"].extend(json["redirects"])
        if "pages" in json:
            end_json["pages"].update(json["pages"])

    return end_json