code: def parse(self, stream):
          
          yaml = self._load_yaml()
  
          try:
              parsed_obj = yaml.safe_load(stream)
          except Exception as e:
              raise ConfigFileParserException("Couldn't parse config file: %s" % e)
  
          if not isinstance(parsed_obj, dict):
              raise ConfigFileParserException("The config file doesn't appear to "
                  "contain 'key: value' pairs (aka. a YAML mapping). "
                  "yaml.load('%s') returned type '%s' instead of 'dict'." % (
                  getattr(stream, 'name', 'stream'),  type(parsed_obj).__name__))
  
          result = OrderedDict()
          for key, value in parsed_obj.items():
              if isinstance(value, list):
                  result[key] = value
              else:
                  result[key] = str(value)
  
          return result
docs: Parses the keys and values from a config file.