code: def _add_route(self, method, path, middleware=None):
          
          if middleware is not None:
              self.add(method, path, middleware)
              return self
          else:
              # return a lambda that will return the 'func' argument
              return lambda func: (
                  self.add(method, path, func),
                  func
              )[1]
docs: The implementation of adding a route