nl: attrs as a dictionary with an entry: checkbox_id for 'id', substitute the result for value under the 'clear' key of the substitutions dictionary. format self.template_with_clear with substitutions, substitute the result for value under the 'clear_template' key of,
code: substitutions [ 'clear_template' ] = self . template_with_clear % substitutions