
    j                         d Z ddlZddlmZmZ ddlmZ  ed          Zdee         dee         fdZ	d	ee         d
e
deee                  fdZdS )zIUtilities for working with data structures like lists, dicts and tuples.
    N)IterableSequence)TypeVarTelemsreturnc                     t          j        dt          d           t                      }g }| D ]0}||vr*|                    |           |                    |           1|S )a  uniq_stable(elems) -> list

    .. deprecated:: 9.8
        This function is deprecated and will be removed in a future version.
        It is not used within IPython and was never part of the public API.

    Return from an iterable, a list of all the unique elements in the input,
    but maintaining the order in which they first appear.

    Note: All elements in the input must be hashable for this routine
    to work, as it internally uses a set for efficiency reasons.
    zyuniq_stable is deprecated since IPython 9.8 and will be removed in a future version. It was never part of the public API.   )
stacklevel)warningswarnDeprecationWarningsetaddappend)r   seenresultxs       Y/home/ubuntu/.hermes/hermes-agent/venv/lib/python3.11/site-packages/IPython/utils/data.pyuniq_stabler      sw     M	/	    55DF  D==HHQKKKMM!M    seqsizec                 \      fdt          dt                               D             S )z.Chop a sequence into chunks of the given size.c                 *    g | ]}||z            S  r   ).0ir   r   s     r   
<listcomp>zchop.<locals>.<listcomp>2   s&    @@@!CAH@@@r   r   )rangelen)r   r   s   ``r   chopr"   0   s3    @@@@@uQC$'?'?@@@@r   )__doc__r   collections.abcr   r   typingr   r   listr   intr"   r   r   r   <module>r(      s      . . . . . . . .       GCLLx{ tAw    8Ahqk A Ahqk): A A A A A Ar   