def _get_response_headers(response):
    """
    Django 3.2 (more specifically, commit bcc2befd0e9c1885e45b46d0b0bcdc11def8b249) broke the usage of _headers, which
    were turned into a public interface, so we need this compatibility wrapper.
    """
    try:
        return response.headers
    except AttributeError:
        return response._headers