nl: and final_attrs, append the result to output. call the method self.format_output with an argument output, use the result as an argument for the call to the function mark_safe,
code: return mark_safe ( self . format_output ( output ) )