code: def render_tag(tag, attrs=None, content=None, close=True):
      
      builder = "<{tag}{attrs}>{content}"
      if content or close:
          builder += "</{tag}>"
      return format_html(
          builder,
          tag=tag,
          attrs=mark_safe(flatatt(attrs)) if attrs else "",
          content=text_value(content),
      )
docs: Render a HTML tag