code: def _load_yaml_config(cls, config_data, filename="(unknown)"):
          
  
          try:
              config = yaml.safe_load(config_data)
          except yaml.YAMLError as err:
              if hasattr(err, 'problem_mark'):
                  mark = err.problem_mark
                  errmsg = ("Invalid YAML syntax in Configuration file "
                            "%(file)s at line: %(line)s, column: %(column)s."
                            % dict(file=filename,
                                   line=mark.line + 1,
                                   column=mark.column + 1))
              else:
                  errmsg = ("YAML error reading Configuration file "
                            "%(file)s"
                            % dict(file=filename))
              logger.error(errmsg)
              raise
  
          logger.info("Configuration: %s", config)
          return config
docs: Load a yaml config file.