@staticmethod<EOL><INDENT>def _use_html_if_available(format_fn):<DEDENT>
def format_using_as_html(v, label=False):<EOL><INDENT>if not label and hasattr(v, '<STR_LIT>'):<EOL><INDENT>return v.as_html()<EOL><DEDENT>else:<EOL><INDENT>return format_fn(v, label)<EOL><DEDENT><DEDENT>return format_using_as_html<EOL>
Use the value's HTML rendering if available, overriding format_fn.