def ParseFileObject(self, parser_mediator, file_object):
    """Parses a MacOS keychain 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.

    Raises:
      UnableToParseFile: when the file cannot be parsed.
    """
    try:
      file_header = self._ReadFileHeader(file_object)
    except (ValueError, errors.ParseError):
      raise errors.UnableToParseFile('Unable to parse file header.')

    tables = self._ReadTablesArray(file_object, file_header.tables_array_offset)

    table = tables.get(self._RECORD_TYPE_APPLICATION_PASSWORD, None)
    if table:
      for record in table.records:
        self._ParseApplicationPasswordRecord(parser_mediator, record)

    table = tables.get(self._RECORD_TYPE_INTERNET_PASSWORD, None)
    if table:
      for record in table.records:
        self._ParseInternetPasswordRecord(parser_mediator, record)
Parses a MacOS keychain 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.

    Raises:
      UnableToParseFile: when the file cannot be parsed.