o
    oh                     @   sL   d Z ddlmZ ddlmZ ddlmZmZmZ efddZ	efdd	Z
d
S )z) Branching Strategies to Traverse a Tree     )product)	basic_fns   )chainidentitydo_onec                    s   t t t fddS )z< Apply a rule down a tree running it on the top nodes first c                    s   t t | S N)salltop_down)exprbrulefns t/var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/sympy/strategies/branch/traverse.py<lambda>
   s    ztop_down.<locals>.<lambda>)r   r   r   r   r   r   r   r
      s   
r
   c                    s,   t |jd\ fdd}|S )z$ Strategic all - apply rule to args )opnewchildrenleafc                 3   sN    | r
| V  d S | }t t |  }|D ]}|g|R  V  qd S r   )r   map)r   myopargssargsr   r   r   r   r   r   r   all_rl   s   
zsall.<locals>.all_rl)r   get)r   r   r   r   r   r   r	      s   r	   N)__doc__	itertoolsr   sympy.strategies.utilr   corer   r   r   r
   r	   r   r   r   r   <module>   s    