code: def parse(stream, Loader=Loader):
      
      loader = Loader(stream)
      try:
          while loader.check_event():
              yield loader.get_event()
      finally:
          loader.dispose()
docs: Parse a YAML stream and produce parsing events.