def load(stream, Loader=Loader):
    """
    Parse the first YAML document in a stream
    and produce the corresponding Python object.
    """
    loader = Loader(stream)
    try:
        return loader.get_single_data()
    finally:
        loader.dispose()

    Parse the first YAML document in a stream
    and produce the corresponding Python object.
    
metadrive/render_pipeline/rplibs/yaml/yaml_py3/__init__.py