docs: def ellipsis_or_number(context, paginator, current_page):
      """
      To avoid display a long pagination bar
  
      :param context: template context
      :param paginator: paginator_obj
      :param current_page: int
      :return: str or None
      """
  
      # Checks is it first page
      chosen_page = int(context['request'].GET['page']) if 'page' in context['request'].GET else 1
  
      if current_page in (chosen_page + 1, chosen_page + 2, chosen_page - 1, chosen_page - 2,
                          paginator.num_pages, paginator.num_pages - 1, 1, 2, chosen_page):
          return current_page
  
      if current_page in (chosen_page + 3, chosen_page - 3):
          return '...'