def _flatten(iterable):
for i in iterable:<EOL><INDENT>if isinstance(i, Iterable) and not isinstance(i, string_types):<EOL><INDENT>for sub_i in _flatten(i):<EOL><INDENT>yield sub_i<EOL><DEDENT><DEDENT>else:<EOL><INDENT>yield i<EOL><DEDENT><DEDENT>
Given an iterable with nested iterables, generate a flat iterable