code: def yaml_load(stream):
      
      # Surprisingly, the CSafeLoader does not seem to be used by default.
      # Check whether the CSafeLoader is available and provide a log message
      # if it is not available.
      global _HAS_YAML_LIBRARY
  
      if _HAS_YAML_LIBRARY is None:
          _HAS_YAML_LIBRARY = hasattr(yaml, 'CSafeLoader')
          if not _HAS_YAML_LIBRARY:
              logger.warning('libyaml was not found! Please install libyaml to'
                             ' speed up loading the model files.')
  
      if _HAS_YAML_LIBRARY:
          loader = yaml.CSafeLoader(stream)
      else:
          loader = yaml.SafeLoader(stream)
      loader.add_constructor('tag:yaml.org,2002:float', float_constructor)
      return loader.get_data()
docs: Load YAML file using safe loader.