code: def request(req=None, method=None, requires_response=True):
      
      if req is None:
          return functools.partial(request, method=method,
                                   requires_response=requires_response)
  
      @functools.wraps(req)
      def wrapper(self, *args, **kwargs):
          if self.lsp_ready:
              params = req(self, *args, **kwargs)
              if params is not None:
                  self.emit_request(method, params, requires_response)
      return wrapper
docs: Call function req and then emit its results to the LSP server.