code: def _ReadParserPresetsFromFile(self):
      
      self._presets_file = os.path.join(
          self._data_location, self._PRESETS_FILE_NAME)
      if not os.path.isfile(self._presets_file):
        raise errors.BadConfigOption(
            'No such parser presets file: {0:s}.'.format(self._presets_file))
  
      try:
        parsers_manager.ParsersManager.ReadPresetsFromFile(self._presets_file)
      except errors.MalformedPresetError as exception:
        raise errors.BadConfigOption(
            'Unable to read presets from file with error: {0!s}'.format(
                exception))
docs: Reads the parser presets from the presets.yaml file.
  
      Raises:
        BadConfigOption: if the parser presets file cannot be read.