  
  
  def simplify_regex(pattern):
      """
      Clean up urlpattern regexes into something somewhat readable by Mere Humans:
      turns something like "^(?P<sport_slug>\w+)/athletes/(?P<athlete_slug>\w+)/$"
      into "<sport_slug>/athletes/<athlete_slug>/"
      """
      # handle named groups first
      pattern = named_group_matcher.sub(lambda m: m.group(1), pattern)
  
      # handle non-named groups
 
</s> remove from django.contrib.admindocs.views import get_return_data_type
 </s> add from django.contrib.admindocs.views import get_return_data_type, simplify_regex
    Clean up urlpattern regexes into something more readable by humans. For
    example, turn "^(?P<sport_slug>\w+)/athletes/(?P<athlete_slug>\w+)/$"
    into "/<sport_slug>/athletes/<athlete_slug>/".
  
  
  def simplify_regex(pattern):
      """
    Clean up urlpattern regexes into something more readable by humans. For
    example, turn "^(?P<sport_slug>\w+)/athletes/(?P<athlete_slug>\w+)/$"
    into "/<sport_slug>/athletes/<athlete_slug>/".
    Clean up urlpattern regexes into something more readable by humans. For
    example, turn "^(?P<sport_slug>\w+)/athletes/(?P<athlete_slug>\w+)/$"
    into "/<sport_slug>/athletes/<athlete_slug>/".
    Clean up urlpattern regexes into something more readable by humans. For
    example, turn "^(?P<sport_slug>\w+)/athletes/(?P<athlete_slug>\w+)/$"
    into "/<sport_slug>/athletes/<athlete_slug>/".
      """
      # handle named groups first
      pattern = named_group_matcher.sub(lambda m: m.group(1), pattern)
  
      # handle non-named groups
keep keep keep keep replace replace replace keep keep keep keep keep
 Refs #26621 -- Added tests for admindocs.views.simplify_regex(). 
django/contrib/admindocs/views.py