code: def use(self, middleware=None, path='/', method_mask=HTTPMethod.ALL):
          
  
          # catch decorator pattern
          if middleware is None:
              return lambda mw: self.use(mw, path, method_mask)
  
          if hasattr(middleware, '__growler_router'):
              router = getattr(middleware, '__growler_router')
              if isinstance(router, (types.MethodType,)):
                  router = router()
              self.add_router(path, router)
          elif isinstance(type(middleware), RouterMeta):
              router = middleware._RouterMeta__growler_router()
              self.add_router(path, router)
          elif hasattr(middleware, '__iter__'):
              for mw in middleware:
                  self.use(mw, path, method_mask)
          else:
              log.info("{} Using {} on path {}", id(self), middleware, path)
              self.middleware.add(path=path,
                                  func=middleware,
                                  method_mask=method_mask)
          return middleware
docs: Use the middleware (a callable with parameters res, req, next)
          upon requests match the provided path.
          A None path matches every request.
          Returns the middleware so this method may be used as a decorator.
  
          Args:
              middleware (callable): A function with signature '(req, res)'
                  to be called with every request which matches path.
  
              path (str or regex): Object used to test the requests
                  path. If it matches, either by equality or a successful
                  regex match, the middleware is called with the req/res
                  pair.
  
              method_mask (Optional[HTTPMethod]): Filters requests by HTTP
                  method. The HTTPMethod enum behaves as a bitmask, so
                  multiple methods may be joined by `+` or `\|`, removed
                  with `-`, or toggled with `^`
                  (e.g. `HTTPMethod.GET + HTTPMethod.POST`,
                        `HTTPMethod.ALL - HTTPMethod.DELETE`).
  
          Returns:
              Returns the provided middleware; a requirement for this method
              to be used as a decorator.