<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def use(self, middleware, path=None):
 """ Call the provided middleware upon requests matching the path. If path is not provided or None, all requests will match. Args: middleware (callable):
 Callable with the signature ``(res, req) -> None`` path (Optional[str or regex]):
 a specific path the request must match for the middleware to be called. Returns: This router """

        self.log.info(" Using middleware {}", middleware)
        if path is None:
            path = MiddlewareChain.ROOT_PATTERN
        self.add(HTTPMethod.ALL, path, middleware)
        return self