call the function format_html with 3 arguments string '<label{0}>{1}</label>', attrs and contents, substitute the result for contents.
contents = format_html ( '<label{0}>{1}</label>' , attrs , contents )