def wait(self, allowed_methods=None):
        """Wait for a method that matches our allowed_methods parameter (the
        default value of None means match any method), and dispatch to it."""
        method_sig, args, content = self.connection._wait_method(
            self.channel_id, allowed_methods)

        return self.dispatch_method(method_sig, args, content)
Wait for a method that matches our allowed_methods parameter (the
        default value of None means match any method), and dispatch to it.