Ë
    ñÏj)  ã                  ó8   — d Z ddlmZ ddlmZmZ ddlZdZdd„Zy)zDDeterministic trace sampling, kept consistent across LangSmith SDKs.é    )Úannotations)ÚAnyÚOptionalNi@B c                óà   — |�|dk\  ry|dk  ry| €yt        j                  t        | «      j                  «       j	                  d«      «      j                  «       }|t        z  }|t        z  |k  S )zØDecide whether `identifier` is sampled in at `sampling_rate`.

    The decision is a pure function of the identifier, so every process and
    every SDK agrees on it, and a run's create and patch never disagree.
    é   Tr   Fzutf-8)ÚxxhashÚxxh3_128ÚstrÚlowerÚencodeÚ	intdigestÚ_SAMPLING_HASH_MODULUS)Ú
identifierÚsampling_rateÚdigestÚbuckets       úZ/var/www/html/gaurav-v2/venv/lib/python3.12/site-packages/langsmith/_internal/_sampling.pyÚis_sampled_by_idr      su   € ð Ð °Ò 2ØØ˜ÒØØÐØô �_‰_œS ›_×2Ñ2Ó4×;Ñ;¸GÓDÓE×OÑOÓQ€FØÔ,Ñ,€FØÔ*Ñ*¨]Ñ:Ð:ó    )r   r   r   zOptional[float]ÚreturnÚbool)	Ú__doc__Ú
__future__r   Útypingr   r   r   r   r   © r   r   Ú<module>r      s   ðÙ Jå "ç  ã à"Ð ô;r   