def ensure_empty(gen):
try:<EOL><INDENT>next(gen)<EOL>return False<EOL><DEDENT>except StopIteration:<EOL><INDENT>return True<EOL><DEDENT>
Return True if the generator is empty.  If it is not empty, the first
    element is discarded.