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