+
    i                          R t ^ RIHtHt R tR# )z%Generic tools for working with trees.)ceillogc                   V '       g   . # V^8  g   Q h\        \        \        V 4      V4      4      pV^8:  d   \        V 4      # . pRpW^,
          ,          p\	        ^ \        V 4      V4       Fq  pWWe,            p\        V4      V8  d   Tp MT\        V4      V8  d0   \	        ^ \        V4      V4       Uu. uF  qWV,            NK  	  ppK?  VP                  V4       Ks  	  V'       da   \        WA4      p\        V4      V\        V4      ,
          8:  d   VP                  V4       MVP                  V4       \        V4      V8:  g   Q hV# u upi )zBuild N-ary tree from sequence of leaf nodes.

Return a list of lists where each non-leaf node is a list containing
max n nodes.
N)r   r   lenlistrangeappendbuild_n_ary_treeextend)	leavesndepthroot
unassigned	full_stepisubtreeks	   &&       x/Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/fontTools/misc/treeTools.pyr	   r	      s&    	q5L5S[!$%EzF| DJai I1c&k9-Q]+w<)# J'lQ38CL!3LM3Laqq5)3LGMGG . ":1w<1s4y=(KK KK 4yA~~K Ns   6EN)__doc__mathr   r   r	        r   <module>r      s    + 'r   