code: def middleware(self, args):
          
          if self.url[(len(self.url) - 1)] == (self.url_, self.controller, dict(method=self.method, request_type=self.request_type, middleware=None)):
              self.url.pop()
          self.url.append((self.url_, self.controller, dict(method=self.method, request_type=self.request_type, middleware=args)))
          return self
docs: Appends a Middleware to the route which is to be executed before the route runs