<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def Parse(self, parser_mediator):
 """Parsers the file entry and extracts event objects. Args: parser_mediator (ParserMediator):
 a parser mediator. Raises: UnableToParseFile: when the file cannot be parsed. """

    file_entry = parser_mediator.GetFileEntry()
    if not file_entry:
      raise errors.UnableToParseFile('Invalid file entry')

    parser_mediator.AppendToParserChain(self)
    try:
      self.ParseFileEntry(parser_mediator, file_entry)
    finally:
      parser_mediator.PopFromParserChain()