'Step a stash of states forward and categorize the successors appropriately.
The parameters to this function allow you to control everything about the stepping and categorization process.
:param stash:           The name of the stash to step (default: \'active\')
:param n:               The number of times to step (default: 1 if "until" is not provided)
:param selector_func:   If provided, should be a function that takes a state and returns a boolean. If True, the
state will be stepped. Otherwise, it will be kept as-is.
:param step_func:       If provided, should be a function that takes a SimulationManager and returns a SimulationManager. Will
be called with the SimulationManager at every step. Note that this function should not actually
perform any stepping - it is meant to be a maintenance function called after each step.
:param successor_func:  If provided, should be a function that takes a state and return its successors.
Otherwise, project.factory.successors will be used.
:param until:           If provided, should be a function that takes a SimulationManager and returns True or False.
Stepping will terminate when it is True.
Additionally, you can pass in any of the following keyword args for project.factory.sim_run:
:param jumpkind:        The jumpkind of the previous exit
:param addr:            An address to execute at instead of the state\'s ip.
:param stmt_whitelist:  A list of stmt indexes to which to confine execution.
:param last_stmt:       A statement index at which to stop execution.
:param thumb:           Whether the block should be lifted in ARM\'s THUMB mode.
:param backup_state:    A state to read bytes from instead of using project memory.
:param opt_level:       The VEX optimization level to use.
:param insn_bytes:      A string of bytes to use for the block instead of the project.
:param size:            The maximum size of the block, in bytes.
:param num_inst:        The maximum number of instructions.
:param traceflags:      traceflags to be passed to VEX. Default: 0
:returns:               The resulting SimulationManager.
:rtype:                 SimulationManager'

def step(self, n=None, selector_func=None, step_func=None, stash=None, successor_func=None, until=None, **kwargs):

    stash = ('active' if (stash is None) else stash)
    n = (n if (n is not None) else (1 if (until is None) else 100000))
    pg = self
    new_active = []
    for state in pg.stashes[stash]:
        self._apply_filter_hooks(state, pg.stashes, new_active)
    pg.stashes[stash] = new_active
    for i in range(n):
        l.debug('Round    %d:    stepping    %s', i, pg)
        pg = pg._one_step(stash=stash, selector_func=selector_func, successor_func=successor_func, **kwargs)
        if (step_func is not None):
            pg = step_func(pg)
        if (len(pg.stashes[stash]) == 0):
            l.debug('Out    of    states    in    stash    %s', stash)
            break
        if ((until is not None) and until(pg)):
            l.debug('Until    function    returned    true')
            break
    return pg
