def react(self, msg):
returned = "<STR_LIT>"<EOL>mtype = type(msg)<EOL>if mtype in stringTypes:<EOL><INDENT>msg = unpack_frame(msg)<EOL><DEDENT>elif mtype == dict:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>raise FrameError("<STR_LIT>" % mtype)<EOL><DEDENT>if msg['<STR_LIT>'] in self.states:<EOL><INDENT>print("<STR_LIT>" % msg['<STR_LIT>'])<EOL>
Called to provide a response to a message if needed.

        msg:
            This is a dictionary as returned by unpack_frame(...)
            or it can be a straight STOMP message. This function
            will attempt to determine which an deal with it.

        returned:
            A message to return or an empty string.