code: def ReadFromFile(self, path):
      
      self._definitions = {}
  
      with open(path, 'r') as file_object:
        for preset_definition in self._ReadPresetsFromFileObject(file_object):
          self._definitions[preset_definition.name] = preset_definition
docs: Reads parser and parser plugin presets from a file.
  
      Args:
        path (str): path of file that contains the the parser and parser plugin
            presets configuration.
  
      Raises:
        MalformedPresetError: if one or more plugin preset definitions are
            malformed.