
    D_i=W                       S r SSKJr  SSKrSSKrSSKrSSKrSSKrSSKJ	r	J
r
  SSKJr  SSKJr  SSKJr  SSKJrJrJrJrJrJr  SS	KJr  SS
KJr  \(       a  SSKJrJrJrJrJrJ r   SSK!J"r"  SSK#J$r$  \" SSS9r%\" SSS9r&SDS jr'SES jr(SFS jr)SFS jr*SFS jr+SGS jr,\" S5      r-SS.       SHS jjr. " S S\R^                  5      r0 " S S \R^                  5      r1 " S! S"\R^                  5      r2 " S# S$\R^                  5      r3 " S% S&\R^                  5      r4SIS' jr5SJS( jr6\" S)S*9SKS+ j5       r7SLS, jr8 " S- S.\9\:\4   5      r;\" S/SS9r<\" S0SS9r= " S1 S2\\=\<4   5      r>\" S3\>\\4   S49r?SMS5 jr@SNS6 jrA " S7 S8\5      rB " S9 S:\5      rC " S; S<\5      rD\B\C-  \D-  rE " S= S>\5      rF    SOS? jrG " S@ SA5      rH    SPSB jrI    SQSC jrJg)RzUtility code for runnables.    )annotationsN)MappingSequence)	lru_cache)	signature)groupby)TYPE_CHECKINGAny
NamedTupleProtocol	TypeGuardTypeVar)override)create_model)AsyncIterableAsyncIterator	AwaitableCallable	CoroutineIterable)Context)StreamEventInputT)contravariantOutput)	covariantc                   #    U  ISh  vN   UI Sh  vN sSSS5      ISh  vN   $  N N N	! , ISh  vN  (       d  f       g= f7f)zRun a coroutine with a semaphore.

Args:
    semaphore: The semaphore to use.
    coro: The coroutine to run.

Returns:
    The result of the coroutine.
N )	semaphorecoros     X/home/james-whalen/.local/lib/python3.13/site-packages/langchain_core/runnables/utils.py
gated_coror"   1   s(      yz yy yyysE   A	)A	/+/A	-A	/A	A8AA	c                   ^#    U c  [         R                  " U6 I Sh  vN $ [         R                  " U 5      m[         R                  " U4S jU 5       6 I Sh  vN $  N? N7f)zGather coroutines with a limit on the number of concurrent coroutines.

Args:
    n: The number of coroutines to run concurrently.
    *coros: The coroutines to run.

Returns:
    The results of the coroutines.
Nc              3  <   >#    U  H  n[        TU5      v   M     g 7fN)r"   ).0cr   s     r!   	<genexpr>*gather_with_concurrency.<locals>.<genexpr>N   s     !JEq*Y":":Es   )asynciogather	Semaphore)ncorosr   s     @r!   gather_with_concurrencyr/   ?   sR      	y^^U+++!!!$I!JE!JKKK	 , Ls!   A!A:A!AA!A!c                p     [        U 5      R                  R                  S5      SL$ ! [         a     gf = f)zCheck if a callable accepts a run_manager argument.

Args:
    callable: The callable to check.

Returns:
    `True` if the callable accepts a run_manager argument, `False` otherwise.
run_managerNFr   
parametersget
ValueErrorcallables    r!   accepts_run_managerr8   Q   s:    "--11-@LL    %( 
55c                p     [        U 5      R                  R                  S5      SL$ ! [         a     gf = f)zCheck if a callable accepts a config argument.

Args:
    callable: The callable to check.

Returns:
    `True` if the callable accepts a config argument, `False` otherwise.
configNFr2   r6   s    r!   accepts_configr<   `   s:    "--11(;4GG r9   c                p     [        U 5      R                  R                  S5      SL$ ! [         a     gf = f)zCheck if a callable accepts a context argument.

Args:
    callable: The callable to check.

Returns:
    `True` if the callable accepts a context argument, `False` otherwise.
contextNFr2   r6   s    r!   accepts_contextr?   o   s:    "--11)<DHH r9   c                 (    [         R                  S:  $ )zCheck if asyncio.create_task accepts a `context` arg.

Returns:
    True if `asyncio.create_task` accepts a context argument, `False` otherwise.
)      )sysversion_infor       r!   asyncio_accepts_contextrF   ~   s     w&&rE   _TF)create_taskc                   [        5       (       a  [        R                  " XS9$ U(       a  [        R                  " U 5      $ U $ )zAwait a coroutine with a context.

Args:
    coro: The coroutine to await.
    context: The context to use.
    create_task: Whether to create a task.

Returns:
    The coroutine with the context.
)r>   )rF   r*   rH   )r    r>   rH   s      r!   coro_with_contextrJ      s7       ""499""4((KrE   c                  J    \ rS rSrSrSS jr\S	S j5       r\S
S j5       rSr	g)IsLocalDict   z Check if a name is a local dict.c                    Xl         X l        g)z\Initialize the visitor.

Args:
    name: The name to check.
    keys: The keys to populate.
N)namekeys)selfrO   rP   s      r!   __init__IsLocalDict.__init__   s     		rE   c                   [        UR                  [        R                  5      (       a  [        UR                  [        R
                  5      (       a  UR                  R                  U R                  :X  a  [        UR                  [        R                  5      (       aZ  [        UR                  R                  [        5      (       a0  U R                  R                  UR                  R                  5        gggggg)z<Visit a subscript node.

Args:
    node: The node to visit.
N)
isinstancectxastLoadvalueNameidrO   sliceConstantstrrP   addrQ   nodes     r!   visit_SubscriptIsLocalDict.visit_Subscript   s     txx**4::sxx00

*4::s||444::++S11 IIMM$****+ 2 5 + 1 +rE   c                   [        UR                  [        R                  5      (       Ga%  [        UR                  R                  [        R
                  5      (       a  UR                  R                  R                  U R                  :X  a  UR                  R                  S:X  a  [        UR                  5      S;   a  [        UR                  S   [        R                  5      (       a`  [        UR                  S   R                  [        5      (       a3  U R                  R                  UR                  S   R                  5        gggggggg)z7Visit a call node.

Args:
    node: The node to visit.
r4   >         r   N)rU   funcrW   	AttributerY   rZ   r[   rO   attrlenargsr]   r^   rP   r_   r`   s     r!   
visit_CallIsLocalDict.visit_Call   s     tyy#--00499??CHH55		""dii/		%'DII&(499Q<66499Q<--s33 IIMM$))A,,,- 4 7 ) ( 0 6 1rE   )rP   rO   N)rO   r^   rP   zset[str]returnNone)ra   zast.Subscriptrn   ro   )ra   zast.Callrn   ro   )
__name__
__module____qualname____firstlineno____doc__rR   r   rb   rl   __static_attributes__r   rE   r!   rL   rL      s2    * , ,  . .rE   rL   c                  ^    \ rS rSrSrS	S jr\S
S j5       r\SS j5       r\SS j5       r	Sr
g)IsFunctionArgDict   z4Check if the first argument of a function is a dict.c                "    [        5       U l        g)z#Create a IsFunctionArgDict visitor.N)setrP   rQ   s    r!   rR   IsFunctionArgDict.__init__   s    !e	rE   c                    UR                   R                   (       d  gUR                   R                   S   R                  n[        X R                  5      R	                  UR
                  5        g)=Visit a lambda function.

Args:
    node: The node to visit.
Nr   )rk   argrL   rP   visitbodyrQ   ra   input_arg_names      r!   visit_LambdaIsFunctionArgDict.visit_Lambda   sE     yy~~*..NII.44TYY?rE   c                    UR                   R                   (       d  gUR                   R                   S   R                  n[        X R                  5      R	                  U5        g)AVisit a function definition.

Args:
    node: The node to visit.
Nr   rk   r   rL   rP   r   r   s      r!   visit_FunctionDef#IsFunctionArgDict.visit_FunctionDef   A     yy~~*..NII.44T:rE   c                    UR                   R                   (       d  gUR                   R                   S   R                  n[        X R                  5      R	                  U5        g)HVisit an async function definition.

Args:
    node: The node to visit.
Nr   r   r   s      r!   visit_AsyncFunctionDef(IsFunctionArgDict.visit_AsyncFunctionDef   r   rE   )rP   Nrn   ro   ra   z
ast.Lambdarn   ro   ra   zast.FunctionDefrn   ro   ra   zast.AsyncFunctionDefrn   ro   )rp   rq   rr   rs   rt   rR   r   r   r   r   ru   r   rE   r!   rw   rw      sH    >$ 	@ 	@ 	; 	; 	; 	;rE   rw   c                  J    \ rS rSrSrSS jr\S	S j5       r\S
S j5       rSr	g)	NonLocals   z Get nonlocal variables accessed.c                @    [        5       U l        [        5       U l        g)zCreate a NonLocals visitor.N)rz   loadsstoresr{   s    r!   rR   NonLocals.__init__   s    "u
 #rE   c                @   [        UR                  [        R                  5      (       a&  U R                  R                  UR                  5        g[        UR                  [        R                  5      (       a&  U R                  R                  UR                  5        gg)z7Visit a name node.

Args:
    node: The node to visit.
N)	rU   rV   rW   rX   r   r_   r[   Storer   r`   s     r!   
visit_NameNonLocals.visit_Name  s[     dhh))JJNN477##)),,KKOODGG$ -rE   c                   [        UR                  [        R                  5      (       Ga,  UR                  nUR
                  n[        U[        R                  5      (       a?  UR
                  S-   U-   nUR                  n[        U[        R                  5      (       a  M?  [        U[        R                  5      (       aQ  U R                  R                  UR                  S-   U-   5        U R                  R                  UR                  5        g[        U[        R                  5      (       Ga%  [        UR                  [        R                  5      (       a0  U R                  R                  UR                  R                  5        gUR                  nSn[        U[        R                  5      (       aS  U(       a  UR
                  S-   U-   nOUR
                  nUR                  n[        U[        R                  5      (       a  MS  [        U[        R                  5      (       a,  U R                  R                  UR                  S-   U-   5        gggg)z=Visit an attribute node.

Args:
    node: The node to visit.
. N)rU   rV   rW   rX   rY   ri   rh   rZ   r   r_   r[   discardCallrg   )rQ   ra   parent	attr_exprs       r!   visit_AttributeNonLocals.visit_Attribute  s    dhh))ZZF		IVS]]33"KK#-	9	 VS]]33 &#((++

vyy3:;

""699-FCHH--fkk38844JJNN6;;>>2#[[F "I$VS]];;$(.c(9I(EI(.I!' %VS]];; "&#((33

vyy3'BC 4 . *rE   )r   r   Nr   )ra   zast.Namern   ro   )ra   zast.Attributern   ro   )
rp   rq   rr   rs   rt   rR   r   r   r   ru   r   rE   r!   r   r      s4    *&
 	% 	% D DrE   r   c                  ^    \ rS rSrSrS	S jr\S
S j5       r\SS j5       r\SS j5       r	Sr
g)FunctionNonLocalsi0  z2Get the nonlocal variables accessed of a function.c                "    [        5       U l        g)z#Create a FunctionNonLocals visitor.N)rz   	nonlocalsr{   s    r!   rR   FunctionNonLocals.__init__3  s    #&5rE   c                    [        5       nUR                  U5        U R                  R                  UR                  UR
                  -
  5        g)r   Nr   r   r   updater   r   rQ   ra   visitors      r!   r   #FunctionNonLocals.visit_FunctionDef7  6     +dgmmgnn<=rE   c                    [        5       nUR                  U5        U R                  R                  UR                  UR
                  -
  5        g)r   Nr   r   s      r!   r   (FunctionNonLocals.visit_AsyncFunctionDefB  r   rE   c                    [        5       nUR                  U5        U R                  R                  UR                  UR
                  -
  5        g)r~   Nr   r   s      r!   r   FunctionNonLocals.visit_LambdaM  r   rE   )r   Nr   r   r   r   )rp   rq   rr   rs   rt   rR   r   r   r   r   ru   r   rE   r!   r   r   0  sF    <) > > > > > >rE   r   c                  6    \ rS rSrSrSS jr\SS j5       rSrg)	GetLambdaSourceiY  z)Get the source code of a lambda function.c                     SU l         SU l        g)zInitialize the visitor.Nr   )sourcecountr{   s    r!   rR   GetLambdaSource.__init__\  s    "&
rE   c                    U =R                   S-  sl         [        [        S5      (       a  [        R                  " U5      U l        gg)r~   re   unparseN)r   hasattrrW   r   r   r`   s     r!   r   GetLambdaSource.visit_Lambdaa  s3     	

a
3	""++d+DK #rE   )r   r   Nr   r   )	rp   rq   rr   rs   rt   rR   r   r   ru   r   rE   r!   r   r   Y  s    3
 , ,rE   r   c                J    [         R                  " U 5      n[        R                  " [        R
                  " U5      5      n[        5       nUR                  U5        UR                  (       a  [        UR                  5      $ S$ ! [        [        [        [        4 a     gf = f)zGet the keys of the first argument of a function if it is a dict.

Args:
    func: The function to check.

Returns:
    The keys of the first argument if it is a dict, None otherwise.
N)inspect	getsourcerW   parsetextwrapdedentrw   r   rP   sortedSyntaxError	TypeErrorOSErrorSystemError)rg   codetreer   s       r!    get_function_first_arg_dict_keysr   m  sw      &yy./#%d'.||vgll#==G[9 s   B B B B"!B"c                    U R                   S:w  a  U R                   OSn [        R                  " U 5      n[        R
                  " [        R                  " U5      5      n[        5       nUR                  U5        UR                  S:X  a  UR                  $ U$ ! [         a    Sn Nf = f! [        [        [        [        4 a    Us $ f = f)zGet the source code of a lambda function.

Args:
    func: a Callable that can be a lambda function.

Returns:
    the source code of the lambda function.
z<lambda>Nre   )rp   AttributeErrorr   r   rW   r   r   r   r   r   r   r   r   r   r   r   )rg   rO   r   r   r   s        r!   get_lambda_sourcer     s     $ ;t}}  &yy./!#d %]]a/7>>9T9   G[9 s#   B AB, B)(B),C
C   )maxsizec                x    [         R                  " U 5      n[        R                  " [        R
                  " U5      5      n[        5       nUR                  U5        / n[        U S5      (       a:  [        U R                  5      (       a   [         R                  " U R                  5      O[         R                  " U 5      n0 UR                  EUR                  EnUR                  5        H  u  pxXsR                  ;   a  UR                  U5        UR                   Hc  n	SU	;   d  M  U	R!                  U5      (       d  M#  Un
U	R#                  S5      SS  H  nU
c    MB   [%        X5      n
M     UR                  U
5        Me     M     U$ ! [&         a       M{  f = f! [(        [*        [,        [.        4 a    / s $ f = f)zGet the nonlocal variables accessed by a function.

Args:
    func: The function to check.

Returns:
    The nonlocal variables accessed by the function.
__wrapped__r   re   N)r   r   rW   r   r   r   r   r   r   r7   r   getclosurevarsglobalsr   itemsappend
startswithsplitgetattrr   r   r   r   r   )rg   r   r   r   valuesclosure
candidateskvkkvvparts               r!   get_function_nonlocalsr     sx     &yy./#%d t]++9I9I0J0J ""4#3#34''- 	
 >=7+<+<=
$$&DA%%%a ''"9q!1!1B "ab 1:!"!(!2B	 !2 b) ( '$ M  . "!" G[9 	sB   D F &F >F F)F 
F	F F	F F98F9c                    [        U5      nSU-  nU R                  5       nSR                  US   /USS  Vs/ s H  oSU-   PM	     sn-   5      $ s  snf )zIndent all lines of text after the first line.

Args:
    text: The text to indent.
    prefix: Used to determine the number of spaces to indent.

Returns:
    The indented text.
 
r   re   N)rj   
splitlinesjoin)textprefixn_spacesspaceslineslines         r!   indent_lines_after_firstr     sV     6{H8^FOOE99eAhZU12Y"GYTD=Y"GGHH"Gs   A
c                  ,    \ rS rSrSrSS jrSS jrSrg)AddableDicti  z3Dictionary that can be added to another dictionary.c                    [        U 5      nU H*  nX2;  d  X#   c  X   X#'   M  X   c  M   X#   X   -   nXBU'   M,     U$ ! [         a    X   n Nf = f)zAdd a dictionary to this dictionary.

Args:
    other: The other dictionary to add.

Returns:
    A dictionary that is the result of adding the two dictionaries.
r   r   rQ   otherchunkkeyaddeds        r!   __add__AddableDict.__add__  sq     D!C5:#5"Z
''!J3E #c
   ! '!JE'   	>AAc                    [        U5      nU  H*  nX2;  d  X#   c  X   X#'   M  X   c  M   X#   X   -   nXBU'   M,     U$ ! [         a    X   n Nf = f)zAdd this dictionary to another dictionary.

Args:
    other: The other dictionary to be added to.

Returns:
    A dictionary that is the result of adding the two dictionaries.
r   r   s        r!   __radd__AddableDict.__radd__  sq     E"C5:#5!Y
&&!J2E #c
   ! & IE&r   r   N)r   r   rn   r   )rp   rq   rr   rs   rt   r   r   ru   r   rE   r!   r   r     s    =*rE   r   _T_co	_T_contrac                  "    \ rS rSrSrSS jrSrg)SupportsAddi  z+Protocol for objects that support addition.c                   g)z!Add the object to another object.Nr   )rQ   xs     r!   r   SupportsAdd.__add__  s    rE   r   N)r  r  rn   r  )rp   rq   rr   rs   rt   r   ru   r   rE   r!   r  r    s
    50rE   r  Addable)boundc                .    SnU  H  nUc  UOX-   nM     U$ )zAdd a sequence of addable objects together.

Args:
    addables: The addable objects to add.

Returns:
    The result of adding the addable objects.
Nr   addablesfinalr   s      r!   r_   r_     s%     !EEM LrE   c                D   #    SnU   Sh  vN nUc  UOX-   nM   N
 U$ 7f)zAsynchronously add a sequence of addable objects together.

Args:
    addables: The addable objects to add.

Returns:
    The result of adding the addable objects.
Nr   r  s      r!   aaddr    s/      !E :eEM:xLs      c                  z    \ rS rSr% SrS\S'    SrS\S'    SrS\S'    SrS	\S
'    Sr	S\S'    \
SS j5       rSrg)ConfigurableFieldi,  z)Field that can be configured by the user.r^   r[   N
str | NonerO   descriptionz
Any | None
annotationFbool	is_sharedc                D    [        U R                  U R                  45      $ r%   )hashr[   r  r{   s    r!   __hash__ConfigurableField.__hash__:  s    TWWdoo.//rE   r   rn   int)rp   rq   rr   rs   rt   __annotations__rO   r  r  r  r   r  ru   r   rE   r!   r  r  ,  sS    3G-D*!"K"(!J
!'It&0 0rE   r  c                      \ rS rSr% SrS\S'    S\S'    S\S'    SrS	\S
'    SrS	\S'    SrS\S'    \	SS j5       r
Srg)ConfigurableFieldSingleOptioni?  z>Field that can be configured by the user with a default value.r^   r[   Mapping[str, Any]optionsdefaultNr  rO   r  Fr  r  c                    [        U R                  [        U R                  R	                  5       5      U R
                  45      $ r%   r  r[   tupler"  rP   r#  r{   s    r!   r  &ConfigurableFieldSingleOption.__hash__O  s.    TWWeDLL$5$5$78$,,GHHrE   r   r  rp   rq   rr   rs   rt   r  rO   r  r  r   r  ru   r   rE   r!   r   r   ?  sY    HG-$L*D*!"K"(It&I IrE   r   c                      \ rS rSr% SrS\S'    S\S'    S\S'    S	rS
\S'    S	rS
\S'    SrS\S'    \	SS j5       r
Srg	)ConfigurableFieldMultiOptioniT  zFField that can be configured by the user with multiple default values.r^   r[   r!  r"  zSequence[str]r#  Nr  rO   r  Fr  r  c                    [        U R                  [        U R                  R	                  5       5      [        U R
                  5      45      $ r%   r%  r{   s    r!   r  %ConfigurableFieldMultiOption.__hash__d  s3    TWWeDLL$5$5$78%:MNOOrE   r   r  r(  r   rE   r!   r*  r*  T  sZ    PG-$+D*!"K"(It&P PrE   r*  c                      \ rS rSr% SrS\S'    S\S'    SrS\S	'    SrS\S
'    SrS\S'    Sr	S\S'    Sr
S\S'   Srg)ConfigurableFieldSpecin  zKField that can be configured by the user. It is a specification of a field.r^   r[   r
   r  Nr  rO   r  r#  Fr  r  list[str] | Nonedependenciesr   )rp   rq   rr   rs   rt   r  rO   r  r#  r  r0  ru   r   rE   r!   r.  r.  n  sW    UG-O&D*!"K"(GS+It&%)L"))rE   r.  c                  ^ [        [        U S S9S 5      n/ nU Hk  u  p4[        U5      m[        U5      n[	        U5      S:X  d  [        U4S jU 5       5      (       a  UR                  T5        MW  SU ST/UQ 3n[        U5      e   U$ )zGet the unique config specs from a sequence of config specs.

Args:
    specs: The config specs.

Returns:
    The unique config specs.

Raises:
    ValueError: If the runnable sequence contains conflicting config specs.
c                H    U R                   /U R                  =(       d    / Q7$ r%   )r[   r0  ss    r!   <lambda>)get_unique_config_specs.<locals>.<lambda>  s    QTT$CQ^^-Ar$CrE   )r   c                    U R                   $ r%   )r[   r3  s    r!   r5  r6    s    PQPTPTrE   r   c              3  ,   >#    U  H	  oT:H  v   M     g 7fr%   r   )r&   ofirsts     r!   r(   *get_unique_config_specs.<locals>.<genexpr>  s     ">v!:vs   z6RunnableSequence contains conflicting config specsfor z: )r   r   nextlistrj   allr   r5   )specsgroupeduniquespec_iddupesothersmsgr:  s          @r!   get_unique_config_specsrF    s     uCDnG +-F!Uev;!s">v">>>MM% ir5"26"2!35  S/! " MrE   c                  T    \ rS rSrSSSSSSS.             SS jjrSS jrSrg)	_RootEventFilteri  Ninclude_namesinclude_typesinclude_tagsexclude_namesexclude_typesexclude_tagsc               L    Xl         X l        X0l        X@l        XPl        X`l        g)zUtility to filter the root event in the astream_events implementation.

This is simply binding the arguments to the namespace to make save on
a bit of typing in the astream_events implementation.
NrI  )rQ   rJ  rK  rL  rM  rN  rO  s          r!   rR   _RootEventFilter.__init__  s(     +*(**(rE   c                t  ^  T R                   c  T R                  c  T R                  c  SnOSnUR                  S5      =(       d    / nT R                   b  U=(       d    US   T R                   ;   nT R                  b  U=(       d    UT R                  ;   nT R                  b  U=(       d    [	        U 4S jU 5       5      nT R
                  b  U=(       a    US   T R
                  ;  nT R                  b  U=(       a    UT R                  ;  nT R                  b  U=(       a    [        U 4S jU 5       5      nU$ )z&Determine whether to include an event.TFtagsrO   c              3  @   >#    U  H  oTR                   ;   v   M     g 7fr%   )rL  r&   tagrQ   s     r!   r(   1_RootEventFilter.include_event.<locals>.<genexpr>  s     $T#D,=,=%=   c              3  @   >#    U  H  oTR                   ;  v   M     g 7fr%   )rO  rU  s     r!   r(   rW    s      &8B4,,,
rX  )	rJ  rK  rL  r4   anyrM  rN  rO  r>  )rQ   event	root_typeinclude
event_tagss   `    r!   include_event_RootEventFilter.include_event  s$    &""*!!)GGYYv&,"
)Dv$2D2D!DG)@d.@.@!@G(T$T$T!TG)I%-t7I7I"IG)E)43E3E"EG( # &8B& #G rE   )rM  rO  rN  rJ  rL  rK  )rJ  Sequence[str] | NonerK  ra  rL  ra  rM  ra  rN  ra  rO  ra  rn   ro   )r[  r   r\  r^   rn   r  )rp   rq   rr   rs   rR   r_  ru   r   rE   r!   rH  rH    sf     /3.2-1.2.2-1) ,) ,	)
 +) ,) ,) +) 
),rE   rH  c                    [         R                  " U 5      =(       d3    [        U S5      =(       a     [         R                  " U R                  5      $ )zCheck if a function is an async generator.

Args:
    func: The function to check.

Returns:
    `True` if the function is an async generator, `False` otherwise.
__call__)r   isasyncgenfunctionr   rc  rg   s    r!   is_async_generatorrf    s=     %%d+ j! 	6&&t}}5rE   c                    [         R                  " U 5      =(       d3    [        U S5      =(       a     [         R                  " U R                  5      $ )zCheck if a function is async.

Args:
    func: The function to check.

Returns:
    `True` if the function is async, `False` otherwise.
rc  )r*   iscoroutinefunctionr   rc  re  s    r!   is_async_callableri    s=     &&t, j! 	7''6rE   )r   zasyncio.Semaphorer    r   rn   r
   )r-   z
int | Noner.   r   rn   r=  )r7   zCallable[..., Any]rn   r  )rn   r  )r    Awaitable[_T]r>   r   rH   r  rn   rj  )rg   r   rn   r/  )rg   r   rn   r  )rg   r   rn   z	list[Any])r   r^   r   r^   rn   r^   )r  zIterable[Addable]rn   Addable | None)r  zAsyncIterable[Addable]rn   rk  )r?  zIterable[ConfigurableFieldSpec]rn   zlist[ConfigurableFieldSpec])rg   r
   rn   z'TypeGuard[Callable[..., AsyncIterator]])rg   r
   rn   z#TypeGuard[Callable[..., Awaitable]])Krt   
__future__r   rW   r*   r   rC   r   collections.abcr   r   	functoolsr   r   	itertoolsr   typingr	   r
   r   r   r   r   typing_extensionsr   langchain_core.utils.pydanticr   r   r   r   r   r   r   contextvarsr   langchain_core.runnables.schemar   r   r   r"   r/   r8   r<   r?   rF   rG   rJ   NodeVisitorrL   rw   r   r   r   r   r   r   r   dictr^   r   r  r  r  r	  r_   r  r  r   r*  AnyConfigurableFieldr.  rF  rH  rf  ri  r   rE   r!   <module>rx     s:   ! " 
   
  .     ' 7  $;t,	T	*L$' T] CH
");?(/.#// /.d); );X1D 1Dh&> &>R,coo ,(&:. 3' 'TI +$sCx. +\ 	4(Kt4	0(9e+, 0 );sCx#8
90
 0&IJ I*P: P, 558TT 
*J *&* @4 4n
,"
(rE   