def aggregate_member_by_karma(self, member: KarmaMember) -> int:
    self._filter_query['guild_id'] = member.guild_id
    self._filter_query['member_id'] = member.member_id
    pipeline = [{'$unwind': '$karma'}, {'$match': self._filter_query}, {'$group': {'_id': {'member_id': '$member_id'}, 'karma': {'$sum': '$karma'}}}]
    doc_cursor = self._karma.aggregate(pipeline)
    for doc in doc_cursor:
        return doc['karma']
def aggregate_member_by_karma(self, member: KarmaMember) -> int:
    self._filter_query['guild_id'] = member.guild_id
    self._filter_query['member_id'] = member.member_id
    pipeline = [{'$unwind': '$karma'}, {'$match': self._filter_query}, {'$group': {'_id': {'member_id': '$member_id'}, 'karma': {'$sum': '$karma'}}}]
    doc_cursor = self._karma.aggregate(pipeline)
    for doc in doc_cursor:
        return doc['karma']