def METHOD_NAME(self, task, config):
    if not config:
        return
    identified_by = (
        '{{ media_id }}' if config['identified_by'] == 'auto' else config['identified_by']
    )
    grouped_entries = group_entries(task.accepted, identified_by)
    if not grouped_entries:
        return
    with Session() as session:
        # Prefetch Data
        existing_ids = (
            session.query(EntryTimeFrame)
            .filter(EntryTimeFrame.id.in_(grouped_entries.keys()))
            .all()
        )
        existing_ids = {e.id: e for e in existing_ids}
        for identifier, entries in grouped_entries.items():
            if not entries:
                continue
            id_timeframe = existing_ids.get(identifier)
            if not id_timeframe:
                continue
            # Sort entities in order of quality
            entries.sort(key=lambda e: e['quality'], reverse=True)
            # First entry will be the best quality
            best_entry = entries[0]
            id_timeframe.quality = best_entry['quality']
            id_timeframe.title = best_entry['title']
            id_timeframe.proper_count = best_entry.get('proper_count', 0)
            id_timeframe.status = 'accepted'