'Unregister task by name.
Arguments:
name (str): name of the task to unregister, or a
:class:`celery.task.base.Task` with a valid `name` attribute.
Raises:
celery.exceptions.NotRegistered: if the task is not registered.'

def unregister(self, name):

    try:
        self.pop(getattr(name, u'name', name))
    except KeyError:
        raise self.NotRegistered(name)
