def _info_handler(self, data):
def raise_exception():<EOL><INDENT>"""<STR_LIT>"""<EOL>self.log.error("<STR_LIT>", data['<STR_LIT:code>'], info_message[data['<STR_LIT:code>']])<EOL>raise ValueError("<STR_LIT>" % (data['<STR_LIT:code>'], info_message[data['<STR_LIT:code>']]))<EOL><DEDENT>if '<STR_LIT:code>' not in data and '<STR_LIT:version>' in data:<EOL><INDENT>self.log.info('<STR_LIT>', data['<STR_LIT:version>'])<EOL>return<EOL><DEDENT>info_message = {<NUM_LIT>: '<STR_LIT>',<EOL><NUM_LIT>: '<STR_LIT>'<EOL>'<STR_LIT>',<EOL><NUM_LIT>: '<STR_LIT>'<EOL>'<STR_LIT>',<EOL><NUM_LIT>: '<STR_LIT>'<EOL>'<STR_LIT>'}<EOL>codes = {<NUM_LIT>: self.reconnect, <NUM_LIT>: self._pause,<EOL><NUM_LIT>: self._unpause}<EOL>if '<STR_LIT:version>' in data:<EOL><INDENT>self.log.info("<STR_LIT>", data['<STR_LIT:version>'])<EOL>return<EOL><DEDENT>try:<EOL><INDENT>self.log.info(info_message[data['<STR_LIT:code>']])<EOL>codes[data['<STR_LIT:code>']]()<EOL><DEDENT>except KeyError as e:<EOL><INDENT>self.log.exception(e)<EOL>self.log.error("<STR_LIT>", data['<STR_LIT:code>'])<EOL>raise<EOL><DEDENT>
Handle INFO messages from the API and issues relevant actions.

:param data:
:param ts: