def _load_contents(self, polib, resource):
import struct<EOL>try:<EOL><INDENT>return polib.mofile(resource)<EOL><DEDENT>except (ValueError, AttributeError, struct.error) as e:<EOL><INDENT>self.rethrow(<EOL>"<STR_LIT>".format(resource),<EOL>InvalidResourceException)<EOL><DEDENT>
Parses machine object (MO) format using polib

@type resource: str
@param resource: resource

@rtype: list