def _fill_statistic_parts(self, parts, grouper):
        for task in Tasks.find({
            'project': self.name,
            'created': {'$exists': True},
            'success_percent': {'$exists': True},
        }):
            if type(task['created']) is datetime:
                group = grouper(task)
                parts[group]['count'] += 1
                parts[group]['sum_percent'] +=\
                    task['success_percent']
                parts[group][
                    'success' if task['status'] == STATUS_SUCCESS else 'failed'
                ] += 1
Fill statistic parts
dataset/ETHPy150Open nvbn/coviolations_web/projects/models.py/Project._fill_statistic_parts