def header_id_from_text(self, text, prefix, n):
header_id = _slugify(text)<EOL>if prefix and isinstance(prefix, base_string_type):<EOL><INDENT>header_id = prefix + '<STR_LIT:->' + header_id<EOL><DEDENT>if header_id in self._count_from_header_id:<EOL><INDENT>self._count_from_header_id[header_id] += <NUM_LIT:1><EOL>header_id += '<STR_LIT>' % self._count_from_header_id[header_id]<EOL><DEDENT>else:<EOL><INDENT>self._count_from_header_id[header_id] = <NUM_LIT:1><EOL><DEDENT>return header_id<EOL>
Generate a header id attribute value from the given header
        HTML content.

        This is only called if the "header-ids" extra is enabled.
        Subclasses may override this for different header ids.

        @param text {str} The text of the header tag
        @param prefix {str} The requested prefix for header ids. This is the
            value of the "header-ids" extra key, if any. Otherwise, None.
        @param n {int} The <hN> tag number, i.e. `1` for an <h1> tag.
        @returns {str} The value for the header tag's "id" attribute. Return
            None to not have an id attribute and to exclude this header from
            the TOC (if the "toc" extra is specified).