with the name of the type of the self class instance of the middleware_method, raise the ValueError with the previous as the argument. call the method self.apply_response_fixes with the request and response as the arguments, substitute the result for response.
response = self . apply_response_fixes ( request , response )