'Run until the SimulationManager has reached a completed state, according to
the current exploration techniques.
TODO: step_func doesn\'t work with veritesting, since veritesting replaces
the default step logic.
:param stash:       Operate on this stash
:param n:           Step at most this many times
:param step_func:   If provided, should be a function that takes a SimulationManager and returns a new SimulationManager. Will
be called with the current SimulationManager at every step.
:return:            The resulting SimulationManager.
:rtype:             SimulationManager'

def run(self, stash=None, n=None, step_func=None):

    if ((len(self._hooks_complete) == 0) and (n is None)):
        l.warn('No    completion    state    defined    for    SimulationManager;    stepping    until    all    states    deadend')
    until_func = (lambda pg: any((h(pg) for h in self._hooks_complete)))
    return self.step(n=n, step_func=step_func, until=until_func, stash=stash)
