+
    )i6                        ^ RI t ^ RIHt ^ RIt^ RIt^ RIHtHtHtH	t	H
t
HtHtHtHtHtHtHtHt ^ RIHtHt R+t0 R,mt^^^0 R-m^^	.3^
R^RR.R/R*R^R	/R/.t]P2                  P5                  R
R. R.RR..4      ]P2                  P5                  R]]].4      R 4       4       tR tR t ! R R4      tR tR t R t!R t"R t#R t$]P2                  P5                  R0]%^3]&^3]'R3](^334      R 4       t)]P2                  P5                  RR ]*! ^4       4       ]+! . R1O4      34      R 4       t,]P2                  P5                  R. R2O4      ]P2                  P5                  R ]PZ                  ]P\                  ]P^                  .4      ]P2                  P5                  R!]P`                  ]Pb                  .4      R" 4       4       4       t2]P2                  P5                  R. R2O4      ]P2                  P5                  R ]PZ                  ]P\                  ]P^                  .4      ]P2                  P5                  R!]Pf                  ]Ph                  .4      R# 4       4       4       t5]P2                  P5                  R. R2O4      ]P2                  P5                  R ]PZ                  ]P\                  ]P^                  .4      ]P2                  P5                  R$. R1O4      R% 4       4       4       t6R& t7R' t8R( t9R) t:R# )3    N)copy)PythonRandomInterfacePythonRandomViaNumpyBitsarbitrary_elementcreate_py_random_statecreate_random_statedict_to_numpy_arraydiscrete_sequenceedges_equalflattengroupsmake_list_of_intspairwisepowerlaw_sequence)_dict_to_numpy_array1_dict_to_numpy_array2foobarbazqweasdresultexisting	existing1	existing2nestedc                 (   Vf   \        W4      p\        V4      ^8X  g   Q hMN\        V4      p\        V4      p\        W4      p\        V4      \        V4      u;8X  d   ^V,           8X  g   Q h Q h\        \	        V4      \
        4      '       g   Q hR # N)r   lenr   
issubclasstypetuple)r   r   val_result	nexistings   &&   \/var/www/html/photoedit/myenv/lib/python3.14/site-packages/networkx/utils/tests/test_misc.pytest_flattenr'   0   s{     ~f%3x2~~v,L	f&3x3w<92	>99999d3i''''    c                  T   . ROp \        V 4      V J g   Q h\        V 4      V 8X  g   Q h\        \        V 4      ^,          \        4      '       g   Q h\        P                  ! \
        P                  \         . RO4       \        P                  ! \
        P                  \         . RO4       R# )   N)r*      g      @*   )r*   r+      kermit)r*   r+   g@)r   
isinstanceintpytestraisesnxNetworkXError)mylists    r&   test_make_list_of_intsr7   ?   sz     FV$...V$...'/2C8888
MM"""$57JK
MM"""$5{Cr(   c                  >    \        ^RR7      p \        ^. ROR7      p R# )   g      @)exponent)distributionN)r   r   r   r   r*   r*   r*   r*   r+   r+   r.   )r   r
   )zs    r&   test_random_number_distributionr=   H   s    "s+A"+LMAr(   c                   N   a  ] tR t^Nt o ]R 4       tR tR tR tR t	R t
RtV tR# )	TestNumpyArrayc                2    \         P                  ! R 4      sR# )numpyN)r2   importorskipnp)clss   &r&   setup_classTestNumpyArray.setup_classO   s       )r(   c                   \         P                  . RO\         P                  R7      p\         P                  . RO4      p\         P                  . RO4      p\        \	        V4      \
        4      '       g   Q h\	        V4      \        V4      8X  g   Q h\	        V4      p\        V^ ,          \        4      '       g   Q h\        P                  ! \        P                  \        V4       R# )r*   )dtypeNr*   r+   r.   )g      ?r+   r.   )g?r+   r.   )rC   arrayint64r0   r   listr1   r2   r3   r4   r5   )selfabcBs   &    r&   test_numpy_to_list_of_ints)TestNumpyArray.test_numpy_to_list_of_intsT   s    HHYbhhH/HH[!HH[!+A.5555 #tAw...a !A$$$$$b&&(91=r(   c                   R ^R^/p\        VR ^ R^/R7      p\        P                  P                  V\        P	                  ^^.4      4       \        VR^ R ^/R7      p\        P                  P                  V\        P	                  ^^.4      4       \        V4      p\        P                  P                  VP                  4       ^4       R# rN   rO   )mappingN)r   rC   testingassert_allcloserJ   sum)rM   drN   s   &  r&   test__dict_to_numpy_array1)TestNumpyArray.test__dict_to_numpy_array1^   s    !S!!!c1c1-=>


""1bhh1v&67!!c1c1-=>


""1bhh1v&67!!$


""1557A.r(   c                *   R R ^R^/RR ^
R^//pR ^R^ /p\        WR7      p\        P                  P                  V\        P	                  ^^
.^^..4      4       \        V4      p\        P                  P                  VP                  4       ^!4       R# rU   )r   rC   rW   rX   rJ   rY   rM   rZ   rV   rN   s   &   r&   test__dict_to_numpy_array2)TestNumpyArray.test__dict_to_numpy_array2h   s    33"C#r3);<3"!!5


""1bhhR1a&/A&BC!!$


""1557B/r(   c                   R R ^R^/RR ^
R^//pR ^ R^/p\        WR7      p\        P                  P                  V\        P	                  ^^.^
^..4      4       R ^R^ /p\        WR7      p\        P                  P                  V\        P	                  ^^
.^^..4      4       \        V4      p\        P                  P                  VP                  4       ^!4       R# rU   )r	   rC   rW   rX   rJ   r   rY   r^   s   &   r&   test_dict_to_numpy_array_a)TestNumpyArray.test_dict_to_numpy_array_ar   s    33"C#r3);<3"3


""1bhhAR/A&BC3"3


""1bhhR1a&/A&BC!!$


""1557B/r(   c                   R ^R^/pR ^ R^/p\        WR7      p\        P                  P                  V\        P	                  ^^.4      4       \        V4      p\        P                  P                  VP                  4       ^4       R# rU   )r	   rC   rW   rX   rJ   r   rY   r^   s   &   r&   test_dict_to_numpy_array_b)TestNumpyArray.test_dict_to_numpy_array_b   sm    !S!3"3


""1bhh1v&67!!$


""1557A.r(    N)__name__
__module____qualname____firstlineno__classmethodrE   rR   r[   r_   rb   re   __static_attributes____classdictcell__)__classdict__s   @r&   r?   r?   N   s5     * *>/00/ /r(   r?   c                     \        ^4      p . ROpVR.,           p\        \        V 4      4      V8X  g   Q h\        \        \        V 4      4      4      V8X  g   Q h\        \        V RR7      4      V8X  g   Q h\        R4      p\        \        V4      4      . 8X  g   Q h\        R4      p\        \        VRR7      4      . 8X  g   Q hR# )   T)cyclicN)r   r*   r*   r+   )r+   r.   )r.   r   rg   )rangerL   r   iter)nodes
node_pairsnode_pairs_cycle
empty_iters       r&   test_pairwiser{      s    !HE)J!VH, J...e%&*444t,-1AAAAbJ$%+++bJD12b888r(   c                      \        \        R . RO4      4      p \        V 4      p^ RR0^RR0^R0/pW8X  g   Q h/ \        / 4      8X  g   Q hR# )abcderN   rO   rP   rZ   eN)r   r   r*   r*   r+   )dictzipr   )many_to_oneactualexpecteds      r&   test_groupsr      sW    s7O45KK FC:q3*a#7Hr(   c                     \         P                  ! R 4      p V P                  P                  p\	        \        ^4      V4      '       g   Q h\	        \        R4      V4      '       g   Q h\	        \        V P                  4      V4      '       g   Q h\	        \        V! ^4      4      V4      '       g   Q hV P                  P                  4       p\	        \        V4      V P                  P                  4      '       g   Q h\         P                  ! \        \
        R4       V P                  V! ^4      P                  ^
4      \        ^4      P                  ^
4      8H  4      '       g   Q hR# )rA   NrN   )r2   rB   randomRandomStater0   r   default_rng	Generatorr3   
ValueErrorallrand)rC   rsrngs      r&   test_create_random_stater      s
   			W	%B			B)!,b1111)$/4444)"))4b9999)"Q%0"5555
))


!C)#.		0C0CDDDD
MM*13766"Q%**R.$7$:$?$?$CCDDDDr(   c                     \         P                  p \        \        ^4      V 4      '       g   Q h\        \        R4      V 4      '       g   Q h\        \        V ! ^4      4      V 4      '       g   Q h\        P
                  ! \        \        R4       \        P                  ! R4      pVP                   P                  pVP                   P                  R4      pVP                   P                  VP                   P                  4       4      p\        p\        p\        \        VP                   4      V4      '       g   Q h\        \        V! ^4      4      V4      '       g   Q h\        \        V4      V4      '       g   Q h\        \        V4      V4      '       g   Q hV! 4       pV! 4       p\        Wu4      '       g   Q h\        W4      '       g   Q h\        V4      V8X  g   Q h\        V4      V8X  g   Q hRp	W2! ^4      3 F@  p
\        V
4      pVP                  ^V	^,           4       VP                  ^V	^,           4       KB  	  R# )r*   NrN   rA   i  l    )r   Randomr0   r   r2   r3   r   rB   r   r   r   SFC64r   r   	randrangerandint)pyrsrC   r   r   rng_explicitold_nprsnprsold_nprs_instancenprs_instanceint64maxrprss               r&   test_create_py_random_stater      s   ==D,Q/6666,T2D9999,T!W5t<<<<
MM*4c:			W	%B			B
))


%C99&&ryy'89L$H#D,RYY7>>>>,RU3X>>>>,S148888,\:DAAAA 
FM'2222m****!"348IIII!-0MAAA #H2a5\$Q'aA&Ax!|$ r(   c            
         \         P                  ! R 4      p ^*pV P                  P                  p\	        V! V4      4      pV! V4      pVP                  ^^4      VP                  ^^4      8X  g   Q hVP                  ^4      VP                  ^ ^4      8X  g   Q hVP                  ^^
4      VP                  ^^
4      8X  g   Q hVP                  . RO4      VP                  . RO4      8X  g   Q hVP                  ^ ^4      VP                  ^ ^4      8X  g   Q hVP                  R4      VP                  R4      8X  g   Q hVP                  ^4      VP                  ^4      8X  g   Q hV P                  VP!                  . RO4      VP!                  . RO4      8H  4      '       g   Q hV P                  VP#                  . RO^4      VP                  . RORRR7      8H  4      '       g   Q hT P                  \%        ^d4       Uu. uF  qSP                  ^^4      NK  	  up\%        ^d4       Uu. uF  qTP                  ^^4      NK  	  up8H  4      '       g   Q hVP                  4       VP'                  4       8X  g   Q hR# u upi u upi rA   g      ?F)replaceNrI   gUUUUUU?)r+   )r2   rB   r   r   r   r   r   uniformchoicegaussnormalexpovariateexponentialparetovariateparetor   shufflesampleru   random_sample)rC   seedr   r   rs42_s         r&   &test_PythonRandomInterface_RandomStater      s   			W	%BD			B
4
)Cd8D ==A$,,q!"4444==t||Aq1111;;q"a!4444::i DKK	$::::99Q?dkk!Q////??34#3#3G#<<<<Q4;;q>11166#++i(DLL,CCDDDD66

9a DKK	4K$OO    66$)#J/JqQ	J/(-c
3
1LLA
3	4    ::<4--//// 	03s   <I7%I<
c            
      "   \         P                  ! R 4      p ^*pV P                  P                  V4      p\	        V P                  P                  V4      4      pVP                  ^^4      VP                  ^^4      8X  g   Q hVP                  ^4      VP                  ^ ^4      8X  g   Q hVP                  ^^
4      VP                  ^^
4      8X  g   Q hVP                  . RO4      VP                  . RO4      8X  g   Q hVP                  ^ ^4      VP                  ^ ^4      8X  g   Q hVP                  R4      VP                  R4      8X  g   Q hVP                  ^4      VP                  ^4      8X  g   Q hV P                  VP!                  . RO4      VP!                  . RO4      8H  4      '       g   Q hV P                  VP#                  . RO^4      VP                  . RORRR7      8H  4      '       g   Q hT P                  \%        ^d4       Uu. uF  qCP'                  ^^4      NK  	  up\%        ^d4       Uu. uF  qBP                  ^^4      NK  	  up8H  4      '       g   Q hVP                  4       VP                  4       8X  g   Q hR# u upi u upi r   )r2   rB   r   r   r   r   integersr   r   r   r   r   r   r   r   r   r   r   ru   r   )rC   r   r   prir   s        r&   $test_PythonRandomInterface_Generatorr      s!   			W	%BD
))


%C
		 5 5d ;
<C ==A#,,q!"4444==s||Aq1111;;q"Q!3333::i CJJy$999999Q?cjjA....??33??7#;;;;Q3::a=00066#++i(CKK	,BBCCCC66

9a CJJy$J$NN    66$)#J/JqQ	J/(-c
3
1LLA
3	4    ::<3::<''' 	03s   J5J
[c                 >    V ! . RO4      p\        V4      V8X  g   Q hR# )r*   NrI   )r   )iterable_typer   iterables   && r&   test_arbitrary_elementr     s!     Y'HX&(222r(   iteratorc              #   $   "   T F  qx  K  	  R # 5ir   rg   ).0is   & r&   	<genexpr>r     s     Aas   c                    \         P                  ! \        RR7      ;_uu_ 4        \        V 4       RRR4       R#   + '       g   i     R# ; i)z0Value error is raised when input is an iterator.zfrom an iterator)matchN)r2   r3   r   r   )r   s   &r&   test_arbitrary_element_raisesr     s-     
z);	<	<(# 
=	<	<	<s	   ;A	ngencreate_usingc                   V! WR7      pV! WR7      p\        VP                  4       VP                  4       VP                  4       R7      '       g   Q h\        VP                  4       VP                  4       VP                  4       R7      '       g   Q hVP                  ^ ^4       \        VP                  4       VP                  4       VP                  4       R7      '       g   Q h\        VP                  4       VP                  4       VP                  4       R7      '       d   Q h\        VP                  4       VP                  4       VP                  4       R7      '       d   Q hR# )zHTest whether edges_equal properly compares edges without attribute data.r   directedN)r   edgesis_directedremove_edge)r   r   r   GHs   &&&  r&   test_edges_equalr     s    
 	A)AA)Aqwwy!'')ammoFFFFqwwy!'')ammoFFFFMM!Qqwwy!'')ammoFFFF1779aggi!--/JJJJ1779aggi!--/JJJJJr(   c                D   V! WR7      pV! WR7      p\        VP                  4       4      pVP                  V4       VP                  V4       \        VP                  4       VP                  4       VP	                  4       R7      '       g   Q hVP                  ^ ^4       \        VP                  4       VP                  4       VP	                  4       R7      '       g   Q h\        VP                  4       VP                  4       VP	                  4       R7      '       d   Q hR# )zDTest whether ``edges_equal`` properly compares edges in multigraphs.r   r   N)rL   r   add_edges_fromr   r   r   )r   r   r   r   r   G_edgess   &&&   r&   test_edges_equal_multiedger   *  s    
 	A)AA)A1779oGWWqwwy!'')ammoFFFFMM!Qqwwy!'')ammoFFFF1779aggi!--/JJJJJr(   weightc                  a V! V 4      pV! V 4      p\        VP                  4       4      pVP                  V3R lV 4       4       \        VP                  4       VP                  4       4      '       g   Q hVP                  V3R lV 4       4       \        VP                  4       VP                  4       4      '       g   Q h\        VP                  RR7      VP                  RR7      4      '       d   Q hR# )zFTest whether ``edges_equal`` properly compares edges with weight data.c              3   2   <"   T F  p. VOSN5x  K  	  R # 5ir   rg   r   r~   r   s   & r&   r   ,test_edges_equal_weighted.<locals>.<genexpr>E  s     <Gqll6lGs   c              3   @   <"   T F  p. VOS^,           N5x  K  	  R# 5i)r*   Nrg   r   s   & r&   r   r   H  s      @1..6A:.s   TdataN)rL   r   add_weighted_edges_fromr   )r   r   r   r   r   r   s   &&f   r&   test_edges_equal_weightedr   <  s    
 	AAAA1779oG<G<<qwwy!''),,,,@@@qwwy!''),,,,1777-qwwDw/ABBBBBr(   c                    \         P                  ! ^4      p \         P                  ! ^4      p\         P                  ! ^\         P                  R7      pR	R^RR/R
R^//p\         P                  ! W4       \	        V P                  RR7      V P                  RR7      4      '       g   Q h\	        V P                  RR7      V P                  4       4      '       d   Q h\         P                  ! W4       \	        V P                  4       VP                  4       4      '       g   Q h\	        V P                  RR7      VP                  RR7      4      '       g   Q hRV^ ,          ^,          R&   \	        V P                  4       VP                  4       4      '       g   Q h\	        V P                  RR7      VP                  RR7      4      '       d   Q hR# )zQTest whether ``edges_equal`` properly compares edges with attribute dictionaries.r   attr1attr2nothingTr   	somethingNrs   rt   )r4   
path_graph
MultiGraphset_edge_attributesr   r   )r   r   Iattrss       r&   test_edges_equal_datar   M  s[   
aA
aA
abmm4Agr7I6!ME1$qwwDw)1777+=>>>>1777-qwwy99991$qwwy!''),,,,qwwDw)1777+=>>>>"AaDGGqwwy!''),,,,1777-qwwDw/ABBBBBr(   c                 J   \         P                  ! ^\         P                  R7      p \         P                  ! ^\         P                  R7      pV P                  ^ ^^ RR7       V P                  ^^^RR7       VP                  ^ ^^ RR7       VP                  ^ ^^RR7       \	        V P                  RR7      V P                  RR7      4      '       g   Q h\	        V P                  4       VP                  4       4      '       d   Q h\	        V P                  RR7      VP                  RR7      4      '       d   Q h\	        V P                  RR7      VP                  RR7      4      '       d   Q h\	        V P                  RRR	7      VP                  RRR	7      4      '       d   Q hR
# )zdTest whether ``edges_equal`` properly compares edges with attribute dictionaries in ``MultiGraphs``.r   bluer   greenr   Tr   )keys)r   r   N)r4   r   r   add_edger   r   r   r   s     r&    test_edges_equal_multigraph_datar   a  sE   
abmm4A
abmm4AJJq!QfJ%JJq!QgJ&JJq!QfJ%JJq!QgJ&qwwDw)1777+=>>>>1779aggi00001777-qwwDw/ABBBB1777-qwwDw/ABBBB177478!''tRV':WXXXXXr(   c                 *   \         P                  ! R.4      p \         P                  ! R.4      p\        V P                  4       VP                  4       RR7      '       g   Q h\        V P                  4       VP                  4       RR7      '       d   Q hR# )z>Test whether ``edges_equal`` properly compares directed edges.Fr   TNrs   )r*   r   )r4   DiGraphr   r   r   s     r&   test_edges_equal_directedr   q  sg    


F8A


F8Aqwwy!'')e<<<<1779aggi$?????r(   c                 b   \         P                  ! 4       p \         P                  ! 4       pV P                  ^ ^RR7       VP                  ^ ^RR7       \        V P	                  RR7      V P	                  RR7      RR7      '       g   Q hVP                  ^^RR7       \        V P	                  RR7      VP	                  RR7      RR7      '       d   Q hV P                  ^^RR7       \        V P	                  RR7      VP	                  RR7      RR7      '       g   Q hV P                  ^^4       V P                  ^^RR7       \        V P	                  RR7      VP	                  RR7      RR7      '       g   Q h\        V P	                  RR7      VP	                  RR7      RR7      '       d   Q hR	# )
zZTest whether ``edges_equal`` properly compares directed edges with attribute dictionaries.r   r   Tr   r   r   r   FN)r4   r   r   r   r   r   r   s     r&   test_edges_equal_directed_datar   z  sZ   


A


AJJq!6J"JJq!6J"qwwDw)1777+=MMMMJJq!7J#1777-qwwDw/ADQQQQJJq!7J#qwwDw)1777+=MMMMMM!QJJq!7J#qwwDw)1777+=NNNN1777-qwwDw/ADQQQQQr(         )r*   r+   )r.   rq   ))      )   )   )	   
      )      r               r9   >   r*   r+   r.   rq   r   r   )r   r  r   )r   r  r  r  r   r   r   r   r   r  r9   >   r   r   rq   r   )r   r  )r  )r  19r9   )r   r   rI   )r   r   r9   );r   r   r2   networkxr4   networkx.utilsr   r   r   r   r   r	   r
   r   r   r   r   r   r   networkx.utils.miscr   r   nested_depth
nested_setnested_mixedmarkparametrizer'   r7   r=   r?   r{   r   r   r   r   r   rL   r"   strsetr   ru   rv   r   complete_graphr   cycle_graphGraphr   r   r   MultiDiGraphr   r   r   r   r   r   rg   r(   r&   <module>r     s          M
 >Aq6"E8U+ub%  D"zl[+<V#WXL,
#KL
( M Y
(DN:/ :/z
9E  %F06(4 !T1IqzC:Qx#P33
 qDO,$	$ k*!2!2BMM2>> RS"((BJJ)?@
K A T +
K k*!2!2BMM2>> RS"--)IJK K T +K k*!2!2BMM2>> RS9-C . T +CC(Y @Rr(   