def parse(self, subscription):
for name in self.methods:<EOL><INDENT>tag = bytes(name.encode('<STR_LIT:utf-8>'))<EOL>if subscription.startswith(tag):<EOL><INDENT>fun = self.methods.get(name)<EOL>message = subscription[len(tag):]<EOL>return tag, message, fun<EOL><DEDENT><DEDENT>return None, None, None<EOL>
Fetch the function registered for a certain subscription