def yaml_load(stream):
<EOL>global _HAS_YAML_LIBRARY<EOL>if _HAS_YAML_LIBRARY is None:<EOL><INDENT>_HAS_YAML_LIBRARY = hasattr(yaml, '<STR_LIT>')<EOL>if not _HAS_YAML_LIBRARY:<EOL><INDENT>logger.warning('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT><DEDENT>if _HAS_YAML_LIBRARY:<EOL><INDENT>loader = yaml.CSafeLoader(stream)<EOL><DEDENT>else:<EOL><INDENT>loader = yaml.SafeLoader(stream)<EOL><DEDENT>loader.add_constructor('<STR_LIT>', float_constructor)<EOL>return loader.get_data()<EOL>
Load YAML file using safe loader.