docs: def do_page_has_content(parser, token):
      """
      Conditional tag that only renders its nodes if the page
      has content for a particular content type. By default the
      current page is used.
  
      Syntax::
  
          {% page_has_content <content_type> [<page var name>] %}
              ...
          {%_end page_has_content %}
  
      Example use::
  
          {% page_has_content 'header-image' %}
              <img src="{{ MEDIA_URL }}{% imageplaceholder 'header-image' %}">
          {% end_page_has_content %}
  
      """
      nodelist = parser.parse(('end_page_has_content',))
      parser.delete_first_token()
      args = token.split_contents()
      try:
          content_type = unescape_string_literal(args[1])
      except IndexError:
          raise template.TemplateSyntaxError(
              "%r tag requires the argument content_type" % args[0]
          )
      if len(args) > 2:
          page = args[2]
      else:
          page = None
      return PageHasContentNode(page, content_type, nodelist)