code: def _range(self, link_map, radius):
          
  
          leftmost_page = max(self.first_page, (self.page - radius))
          rightmost_page = min(self.last_page, (self.page + radius))
  
          nav_items = []
          # Create a link to the first page (unless we are on the first page
          # or there would be no need to insert '..' spacers)
          if self.page != self.first_page and self.first_page < leftmost_page:
              page = link_map["first_page"].copy()
              page["value"] = unicode(page["number"])
              nav_items.append(self.link_tag(page))
  
          for item in link_map["range_pages"]:
              nav_items.append(self.link_tag(item))
  
          # Create a link to the very last page (unless we are on the last
          # page or there would be no need to insert '..' spacers)
          if self.page != self.last_page and rightmost_page < self.last_page:
              page = link_map["last_page"].copy()
              page["value"] = unicode(page["number"])
              nav_items.append(self.link_tag(page))
  
          return self.separator.join(nav_items)
docs: Return range of linked pages to substiture placeholder in pattern