def load_all(stream, Loader=Loader):
loader = Loader(stream)<EOL>try:<EOL><INDENT>while loader.check_data():<EOL><INDENT>yield loader.get_data()<EOL><DEDENT><DEDENT>finally:<EOL><INDENT>loader.dispose()<EOL><DEDENT>
Parse all YAML documents in a stream
and produce corresponding Python objects.