def METHOD_NAME(node, quoteattr=None):
    if quoteattr is None:
        quoteattr = nodes.pseudo_quoteattr
    parts = ["%s.%s" % (node.__class__.__module__, node.__class__.__name__)]
    for attr, truncate_func in [
        ("source", truncate_path),
        ("line", str),
        ("rawsource", truncate),
    ]:
        value = getattr(node, attr, None)
        if value is not None:
            parts.append("%s=%s" % (attr, quote(truncate_func(value))))
    if translatable(node):
        parts.append('translatable="yes"')
    return "<%s>" % " ".join(parts)