def findHierarchy(self, max_subs=<NUM_LIT:10>):
hierarchy = []<EOL>defaults = TOC.default_hierarchy + tuple(<EOL>'<STR_LIT>' % ('<STR_LIT>'*i) for i in range(<NUM_LIT:2>, max_subs))<EOL>for level in defaults:<EOL><INDENT>if getattr(self.source, level, False):<EOL><INDENT>hierarchy.append(level)<EOL><DEDENT><DEDENT>return tuple(hierarchy)<EOL>
Find hierarchy for the LaTeX source.

        >>> TOC.fromLatex(r'\subsection{yo}\section{hello}').findHierarchy()
        ('section', 'subsection')
        >>> TOC.fromLatex(
        ... r'\subsubsubsection{huh}\subsubsection{hah}').findHierarchy()
        ('subsubsection', 'subsubsubsection')
        >>> TOC.fromLatex('\section{h1}\subsection{subh1}\section{h2}\
        ... \subsection{subh2}').findHierarchy()
        ('section', 'subsection')