def list_towers(plugin):
    """
    Lists all the registered towers. The given information comes from memory, so it is summarized.

    Args:
        plugin (:obj:`Plugin`): this plugin.

    Returns:
        :obj:`dict`: a dictionary containing the registered towers data.
    """

    towers_info = {"towers": []}
    for tower_id, tower in plugin.wt_client.towers.items():
        values = {k: v for k, v in tower.to_dict().items() if k not in ["pending_appointments", "invalid_appointments"]}
        pending_appointments = [appointment.get("locator") for appointment, signature in tower.pending_appointments]
        invalid_appointments = [appointment.get("locator") for appointment, signature in tower.invalid_appointments]
        values["pending_appointments"] = pending_appointments
        values["invalid_appointments"] = invalid_appointments
        towers_info["towers"].append({"id": tower_id, **values})

    return towers_info