def do_clear_mobile_push_notifications_for_ids(user_profile_ids: List[int], message_ids: List[int]) -> None:
    if (len(message_ids) == 0):
        return
    assert ((len(user_profile_ids) == 1) or (len(message_ids) == 1))
    messages_by_user = defaultdict(list)
    notifications_to_update = list(UserMessage.objects.filter(message_id__in=message_ids, user_profile_id__in=user_profile_ids).extra(where=[UserMessage.where_active_push_notification()]).values_list('user_profile_id', 'message_id'))
    for (user_id, message_id) in notifications_to_update:
        messages_by_user[user_id].append(message_id)
    for (user_profile_id, event_message_ids) in messages_by_user.items():
        queue_json_publish('missedmessage_mobile_notifications', {'type': 'remove', 'user_profile_id': user_profile_id, 'message_ids': event_message_ids})
def do_clear_mobile_push_notifications_for_ids(user_profile_ids: List[int], message_ids: List[int]) -> None:
    if (len(message_ids) == 0):
        return
    assert ((len(user_profile_ids) == 1) or (len(message_ids) == 1))
    messages_by_user = defaultdict(list)
    notifications_to_update = list(UserMessage.objects.filter(message_id__in=message_ids, user_profile_id__in=user_profile_ids).extra(where=[UserMessage.where_active_push_notification()]).values_list('user_profile_id', 'message_id'))
    for (user_id, message_id) in notifications_to_update:
        messages_by_user[user_id].append(message_id)
    for (user_profile_id, event_message_ids) in messages_by_user.items():
        queue_json_publish('missedmessage_mobile_notifications', {'type': 'remove', 'user_profile_id': user_profile_id, 'message_ids': event_message_ids})