'Purge this history and all HDAs, Collections, and Datasets inside this history.'

def purge(self, history, flush=True, **kwargs):

    self.hda_manager.dataset_manager.error_unless_dataset_purge_allowed()
    for hda in history.datasets:
        if (not hda.purged):
            self.hda_manager.purge(hda, flush=True)
    super(HistoryManager, self).purge(history, flush=flush, **kwargs)
