def cvt_iter(a):
if a is None:<EOL><INDENT>return a<EOL><DEDENT>if not isinstance(a, (tuple, list)):<EOL><INDENT>a = tuple(a)<EOL><DEDENT>return a<EOL>
Convert an iterator/generator to a tuple so that it can be iterated again.

E.g., convert zip in PY3.