def resolve_iterator_class(mode):
 if (isinstance(mode, six.string_types) and (mode not in _iteration_schemes)):
  raise ValueError(('unknown iteration mode string: %s' % mode))
 elif (mode in _iteration_schemes):
  subset_iter_class = _iteration_schemes[mode]
 else:
  subset_iter_class = mode
 return subset_iter_class

def resolve_iterator_class ( mode ) : if ( isinstance ( mode , six . string_types ) and ( mode not in _iteration_schemes ) ) : raise ValueError ( ( 'unknown iteration mode string: %s' % mode ) ) elif ( mode in _iteration_schemes ) : subset_iter_class = _iteration_schemes [ mode ] else : subset_iter_class = mode return subset_iter_class
map textual representations of default iteration modes to classes .