def METHOD_NAME(self, client, locale, topic_id):
    participants = DBSession.query(User.forum_username). \
        join(Association, Association.parent_document_id == User.id). \
        filter(Association.child_document_id == locale.document_id). \
        group_by(User.forum_username)
    for (forum_username,) in participants:
        try:
            client.client.invite_user_to_topic_by_username(forum_username,
                                                           topic_id)
        except Exception:
            log.error('Inviting forum user {} in topic {} failed'
                      .format(forum_username, topic_id),
                      exc_info=True)