K isZdZddlmZddlZddlZddlmZddlmZddlm Z d dZd d dZ y) z* Utilities imported from ipython_genutils ) annotationsN)dedent)indent)Listct|dS)Nz )_indent)vals Z/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/traitlets/utils/text.pyrr s 3 cxtjdtj}t|j }|j |ddd}g}tjdtj}|D]:}|j |tj||}|j|<|S)aWrap multiple paragraphs to fit a specified width. This is equivalent to textwrap.wrap, but with support for multiple paragraphs, as separated by empty lines. Returns ------- list of complete paragraphs, wrapped to fill `ncols` columns. z \n(\s*\n)+Nz\n\s+) recompile MULTILINErstripsplitsearchtextwrapfillappend)textncols paragraph_re paragraphsout_ps indent_reps r wrap_paragraphsrs::mR\\:L $<   D##D)#A#.J F 8R\\2I    A  & a'A a  Mr )r strreturnr)P)rrrintr z List[str]) __doc__ __future__rrrrrrtypingrrr r r's(# & r