Example::

            .. _header_2:

            Header 2
            -------------------------------------------------------------------

        **中文文档**

def header(self, title, level, key, width=80):
        """Example::

            .. _header_2:

            Header 2
            -------------------------------------------------------------------

        **中文文档**
        """
        linestyle_code = {1: "=", 2: "-", 3: "~"}
        if level not in linestyle_code:
            raise Exception("'level' argument has to be 1, 2 or 3")
        else:
            linestyle = linestyle_code[level]

        if key:
            return "\n".join([".. _%s" % key, "", title, linestyle * width])
        else:
            return "\n".join([title, "=" * width])