  from django.http import (
      HttpRequest, HttpResponsePermanentRedirect, HttpResponseRedirect,
  )
  from django.shortcuts import redirect
  from django.test import SimpleTestCase, TestCase, override_settings
  from django.test.utils import override_script_prefix
  from django.urls import (
      NoReverseMatch, Resolver404, ResolverMatch, URLPattern, URLResolver,
      get_callable, get_resolver, get_urlconf, include, path, re_path, resolve,
      reverse, reverse_lazy,
 
</s>
from django.test import (
    RequestFactory, SimpleTestCase, TestCase, override_settings,
)
  from django.http import (
      HttpRequest, HttpResponsePermanentRedirect, HttpResponseRedirect,
  )
  from django.shortcuts import redirect
from django.test import (
    RequestFactory, SimpleTestCase, TestCase, override_settings,
)
  from django.test.utils import override_script_prefix
  from django.urls import (
      NoReverseMatch, Resolver404, ResolverMatch, URLPattern, URLResolver,
      get_callable, get_resolver, get_urlconf, include, path, re_path, resolve,
      reverse, reverse_lazy,
keep keep keep keep replace keep keep keep keep keep
 Fixed #31114 -- Fixed HttpRequest.build_absolute_uri() crash with reverse_lazy() locations.
tests/urlpatterns_reverse/tests.py