def METHOD_NAME(domain):
    """This is used to get (XMLNS, app_id) from submitted forms. The results
    get combined with data from all current app versions which means
    that this is only used to get (XMLNS, app_id) combos from forms submitted
    in the past which no longer have a corresponding form in the app (e.g. form deleted)
    Given that we can cache this for a long period of time under the assumption that
    a user isn't going to submit a form and then delete it from their app immediately.
    """
    query = (FormES()
             .domain(domain)
             .aggregation(
                 TermsAggregation("app_id", "app_id", missing=MISSING_APP_ID).aggregation(
                     TermsAggregation("xmlns", "xmlns.exact")))
             .remove_default_filter("has_xmlns")
             .remove_default_filter("has_user")
             .size(0))
    query_result = query.run()
    form_counts = set()
    for app_id, bucket in query_result.aggregations.app_id.buckets_dict.items():
        for sub_bucket in bucket.xmlns.buckets_list:
            xmlns = sub_bucket.key
            form_counts.add((xmlns, app_id))
    return form_counts