call the method self.build_attrs with 3 arguments: attrs, type as a string 'checkbox', name as name, substitute the result for final_attrs.
final_attrs = self . build_attrs ( attrs , type = 'checkbox' , name = name )