def enumerate_states(*args, **options):
 state = args[0]
 if (not ((len(args) == 2) or (len(args) == 3))):
  raise NotImplementedError('Wrong number of arguments!')
 if (not isinstance(state, StateBase)):
  raise TypeError('First argument is not a state!')
 if (len(args) == 3):
  num_states = args[2]
  options['start_index'] = args[1]
 else:
  num_states = len(args[1])
  options['index_list'] = args[1]
 try:
  ret = state._enumerate_state(num_states, **options)
 except NotImplementedError:
  ret = []
 return ret

def enumerate_states ( * args , ** options ) : state = args [ 0 ] if ( not ( ( len ( args ) == 2 ) or ( len ( args ) == 3 ) ) ) : raise NotImplementedError ( 'Wrong number of arguments!' ) if ( not isinstance ( state , StateBase ) ) : raise TypeError ( 'First argument is not a state!' ) if ( len ( args ) == 3 ) : num_states = args [ 2 ] options [ 'start_index' ] = args [ 1 ] else : num_states = len ( args [ 1 ] ) options [ 'index_list' ] = args [ 1 ] try : ret = state . _enumerate_state ( num_states , ** options ) except NotImplementedError : ret = [ ] return ret
returns instances of the given state with dummy indices appended operates in two different modes: 1 .