(domain)
return output_rows
:param domain:
    :return: List of tuples: ``(doc_type, primary_db_count, es_count)``
:param domain:
    :return: List of tuples: ``(doc_type, primary_db_count, es_count)``
: param domain : : return : List of tuples : ( doc_type primary_db_count es_count )
def get_doc_counts_for_domain(domain):
    """
    :param domain:
    :return: List of tuples: ``(doc_type, primary_db_count, es_count)``
    """
    primary_db_counts = map_counter_doc_types(_get_primary_db_counts(domain))
    es_counts = map_counter_doc_types(
        get_es_counts_by_doc_type(domain, (es.CaseES, es.FormES))
    )
    es_counts.update(get_es_user_counts_by_doc_type(domain))

    all_doc_types = set(primary_db_counts) | set(es_counts)

    output_rows = []
    for doc_type in sorted(all_doc_types, key=lambda d: d.lower()):
        output_rows.append((
            doc_type,
            primary_db_counts[doc_type],
            es_counts[doc_type]
        ))

    return output_rows
def get_doc_counts_for_domain ( domain ) : primary_db_counts = map_counter_doc_types ( _get_primary_db_counts ( domain ) ) es_counts = map_counter_doc_types ( get_es_counts_by_doc_type ( domain , ( es . CaseES , es . FormES ) ) ) es_counts . update ( get_es_user_counts_by_doc_type ( domain ) ) all_doc_types = set ( primary_db_counts ) | set ( es_counts ) output_rows = [ ] for doc_type in sorted ( all_doc_types , key = lambda d : d . lower ( ) ) : output_rows . append ( ( doc_type , primary_db_counts [ doc_type ] , es_counts [ doc_type ] ) ) return output_rows