def realm_client_table(user_summaries: Dict[(str, Dict[(str, Dict[(str, Any)])])]) -> str:
    exclude_keys = ['internal', 'name', 'use', 'send', 'pointer', 'website', 'desktop']
    rows = []
    for (email, user_summary) in user_summaries.items():
        email_link = user_activity_link(email)
        name = user_summary['name']
        for (k, v) in user_summary.items():
            if (k in exclude_keys):
                continue
            client = k
            count = v['count']
            last_visit = v['last_visit']
            row = [format_date_for_activity_reports(last_visit), client, name, email_link, count]
            rows.append(row)
    rows = sorted(rows, key=(lambda r: r[0]), reverse=True)
    cols = ['Last visit', 'Client', 'Name', 'Email', 'Count']
    title = 'Clients'
    return make_table(title, cols, rows)
def realm_client_table(user_summaries: Dict[(str, Dict[(str, Dict[(str, Any)])])]) -> str:
    exclude_keys = ['internal', 'name', 'use', 'send', 'pointer', 'website', 'desktop']
    rows = []
    for (email, user_summary) in user_summaries.items():
        email_link = user_activity_link(email)
        name = user_summary['name']
        for (k, v) in user_summary.items():
            if (k in exclude_keys):
                continue
            client = k
            count = v['count']
            last_visit = v['last_visit']
            row = [format_date_for_activity_reports(last_visit), client, name, email_link, count]
            rows.append(row)
    rows = sorted(rows, key=(lambda r: r[0]), reverse=True)
    cols = ['Last visit', 'Client', 'Name', 'Email', 'Count']
    title = 'Clients'
    return make_table(title, cols, rows)