def compose(stream, Loader=Loader):
loader = Loader(stream)<EOL>try:<EOL><INDENT>return loader.get_single_node()<EOL><DEDENT>finally:<EOL><INDENT>loader.dispose()<EOL><DEDENT>
Parse the first YAML document in a stream
and produce the corresponding representation tree.