# Buggy code
def __call__(self, environ, start_response):
    # type: (Dict[str, str], Callable[..., Any]) -> _ScopedResponse
    if _wsgi_middleware_applied.get(False):
        return self.app(environ, start_response)

    _wsgi_middleware_applied.set(True)
    try:
        hub = Hub(Hub.current)

        with hub:
            with capture_internal_exceptions():
                with hub.configure_scope() as scope:
                    scope.clear_breadcrumbs()
                    scope._name = "wsgi"
                    scope.add_event_processor(_make_wsgi_event_processor(environ))

            span = Span.continue_from_environ(environ)
            span.op = "http.server"
            span.transaction = "generic WSGI request"

            with hub.start_span(span) as span:
                try:
                    rv = self.app(
                        environ,
                        functools.partial(_sentry_start_response, start_response, span),
                    )
                except BaseException:
                    reraise(*_capture_exception(hub))
    finally:
        _wsgi_middleware_applied.set(False)

    return _ScopedResponse(hub, rv)


# Traceback (TypeError)
Traceback (most recent call last):
File "/var/www/pixiu.40huo.cn/pixiu/venv/lib/python3.8/site-packages/apscheduler/executors/base_py3.py", line 29, in run_coroutine_job
retval = await job.func(*job.args, **job.kwargs)
File "/var/www/pixiu.40huo.cn/pixiu/backend/scheduler.py", line 96, in refresh_task
req = await fetch_resource_list(loop=loop)
File "/var/www/pixiu.40huo.cn/pixiu/backend/scheduler.py", line 27, in fetch_resource_list
req = await loop.run_in_executor(executor, send_req, "get", reverse(viewname="resource-list"))
File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/var/www/pixiu.40huo.cn/pixiu/utils/http_req.py", line 37, in send_req
return client.get(url=abs_url, headers=headers)
File "/var/www/pixiu.40huo.cn/pixiu/venv/lib/python3.8/site-packages/requests/sessions.py", line 546, in get
return self.request('GET', url, **kwargs)
File "/var/www/pixiu.40huo.cn/pixiu/venv/lib/python3.8/site-packages/rest_framework/test.py", line 115, in request
return super().request(method, url, *args, **kwargs)
File "/var/www/pixiu.40huo.cn/pixiu/venv/lib/python3.8/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/var/www/pixiu.40huo.cn/pixiu/venv/lib/python3.8/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/var/www/pixiu.40huo.cn/pixiu/venv/lib/python3.8/site-packages/rest_framework/test.py", line 93, in send
wsgi_response = self.app(environ, start_response)
File "/var/www/pixiu.40huo.cn/pixiu/venv/lib/python3.8/site-packages/sentry_sdk/integrations/django/__init__.py", line 101, in sentry_patched_wsgi_handler
return SentryWsgiMiddleware(lambda *a, **kw: old_app(self, *a, **kw))(
File "/var/www/pixiu.40huo.cn/pixiu/venv/lib/python3.8/site-packages/sentry_sdk/integrations/wsgi.py", line 106, in __call__
reraise(*_capture_exception(hub))
File "/var/www/pixiu.40huo.cn/pixiu/venv/lib/python3.8/site-packages/sentry_sdk/_compat.py", line 54, in reraise
raise value
File "/var/www/pixiu.40huo.cn/pixiu/venv/lib/python3.8/site-packages/sentry_sdk/integrations/wsgi.py", line 101, in __call__
rv = self.app(
File "/var/www/pixiu.40huo.cn/pixiu/venv/lib/python3.8/site-packages/sentry_sdk/integrations/django/__init__.py", line 101, in <lambda>
return SentryWsgiMiddleware(lambda *a, **kw: old_app(self, *a, **kw))(
File "/var/www/pixiu.40huo.cn/pixiu/venv/lib/python3.8/site-packages/django/core/handlers/wsgi.py", line 142, in __call__
start_response(status, response_headers)
File "/var/www/pixiu.40huo.cn/pixiu/venv/lib/python3.8/site-packages/sentry_sdk/integrations/wsgi.py", line 121, in _sentry_start_response
return old_start_response(status, response_headers, exc_info)
TypeError: start_response() takes 2 positional arguments but 3 were given

# Fixed code
def __call__(self, status, response_headers, exc_info=None):
    # type: (str, WsgiResponseHeaders, Optional[WsgiExcInfo]) -> WsgiResponseIter
    pass