def METHOD_NAME(query_expression):
    heading = query_expression.heading
    rel = query_expression.proj(*heading.non_blobs)
    info = heading.table_status
    tuples = rel.fetch(limit=config["display.limit"] + 1, format="array")
    has_more = len(tuples) > config["display.limit"]
    tuples = tuples[0 : config["display.limit"]]
    css = """
    <style type="text/css">
        .Table{
            border-collapse:collapse;
        }
        .Table th{
            background: #A0A0A0; color: #ffffff; padding:4px; border:#f0e0e0 1px solid;
            font-weight: normal; font-family: monospace; font-size: 100%;
        }
        .Table td{
            padding:4px; border:#f0e0e0 1px solid; font-size:100%;
        }
        .Table tr:nth-child(odd){
            background: #ffffff;
            color: #000000;
        }
        .Table tr:nth-child(even){
            background: #f3f1ff;
            color: #000000;
        }
        /* Tooltip container */
        .djtooltip {
        }
        /* Tooltip text */
        .djtooltip .djtooltiptext {
            visibility: hidden;
            width: 120px;
            background-color: black;
            color: #fff;
            text-align: center;
            padding: 5px 0;
            border-radius: 6px;
            /* Position the tooltip text - see examples below! */
            position: absolute;
            z-index: 1;
        }
        #primary {
            font-weight: bold;
            color: black;
        }
        #nonprimary {
            font-weight: normal;
            color: white;
        }
        /* Show the tooltip text when you mouse over the tooltip container */
        .djtooltip:hover .djtooltiptext {
            visibility: visible;
        }
    </style>
    """
    head_template = """<div class="djtooltip">
                            <p id="{primary}">{column}</p>
                            <span class="djtooltiptext">{comment}</span>
                        </div>"""
    return """
    {css}
    {title}
        <div style="max-height:1000px;max-width:1500px;overflow:auto;">
        <table border="1" class="Table">
            <thead> <tr style="text-align: right;"> <th> {head} </th> </tr> </thead>
            <tbody> <tr> {body} </tr> </tbody>
        </table>
        {ellipsis}
        {count}</div>
        """.format(
        css=css,
        title="" if info is None else "<b>%s</b>" % info["comment"],
        head="</th><th>".join(
            head_template.format(
                column=c,
                comment=heading.attributes[c].comment,
                primary="primary"
                if c in query_expression.primary_key
                else "nonprimary",
            )
            for c in heading.names
        ),
        ellipsis="<p>...</p>" if has_more else "",
        body="</tr><tr>".join(
            [
                "\n".join(
                    [
                        "<td>%s</td>"
                        % (tup[name] if name in tup.dtype.names else "=BLOB=")
                        for name in heading.names
                    ]
                )
                for tup in tuples
            ]
        ),
        count=("<p>Total: %d</p>" % len(rel))
        if config["display.show_tuple_count"]
        else "",
    )