code: def _serialize_attributes(attributes):
      
      result = ''
      for name, value in attributes.items():
          if not value:
              continue
          result += ' ' + _unmangle_attribute_name(name)
          result += '="' + escape(value, True) + '"'
      return result
docs: Serializes HTML element attributes in a name="value" pair form.