def METHOD_NAME(self, task, config):
    for entry in task.entries:
        if 'torrent' in entry:
            if entry['torrent'].modified:
                # re-write data into a file
                logger.debug('Writing modified torrent file for {}', entry['title'])
                with open(entry['file'], 'wb+') as f:
                    f.write(entry['torrent'].encode())