r"""Build tag attributes.

        :param attrs: tag attributes
        :type attrs: dict
        :rtype: str

def build_attr(self, attrs):
        r"""Build tag attributes.

        :param attrs: tag attributes
        :type attrs: dict
        :rtype: str
        """
        attrs = sorted(attrs.iteritems(), key=lambda x: x[0])
        return ' '.join(map(lambda x: '%s="%s"' % x, attrs))