def send_notifications(self, dataset, retval, einfo):
        task_status = dataset.current_task 

        extra_context = {
            'related_dataset': dataset
        }

        if einfo:
            if hasattr(einfo, 'traceback'):
                tb = einfo.traceback
            else:
                tb = ''.join(traceback.format_tb(einfo[2]))

            task_status.exception(
                ugettext('Import failed'),
                u'%s\n\nTraceback:\n%s' % (unicode(retval), tb)
            )
            
            template_prefix = 'import_failed'
            extra_context['error'] = unicode(retval)
            extra_context['traceback'] = tb
            notification_type = 'Error'
        elif self.is_aborted():
            template_prefix = 'import_aborted'
            notification_type = 'Info'
        else:
            task_status.complete(ugettext('Import complete'))

            template_prefix = 'import_complete'
            extra_context['type_summary'] = retval.summarize()
            notification_type = 'Info'
        
        if task_status.creator:
            notify(
                task_status.creator,
                template_prefix,
                notification_type,
                url='#dataset/%s' % dataset.slug,
                extra_context=extra_context
            )
:see Expression._set_type()
dataset/ETHPy150Open pandaproject/panda/panda/tasks/import_file.py/ImportFileTask.send_notifications--crossover with--dataset/ETHPy150Open nltk/nltk/nltk/sem/logic.py/BooleanExpression._set_type