code: def ParseFileObject(self, parser_mediator, file_object):
      
      evt_file = pyevt.file()
      evt_file.set_ascii_codepage(parser_mediator.codepage)
  
      try:
        evt_file.open_file_object(file_object)
      except IOError as exception:
        parser_mediator.ProduceExtractionWarning(
            'unable to open file with error: {0!s}'.format(exception))
        return
  
      try:
        self._ParseRecords(parser_mediator, evt_file)
      finally:
        evt_file.close()
docs: Parses a Windows EventLog (EVT) file-like object.
  
      Args:
        parser_mediator (ParserMediator): mediates interactions between parsers
            and other components, such as storage and dfvfs.
        file_object (dfvfs.FileIO): a file-like object.