r u f f   :   w a r n i n g :   E n c o u n t e r e d   e r r o r :   A c c e s s   i s   d e n i e d .   ( o s   e r r o r   5 ) 
 
 A t   l i n e : 1   c h a r : 1 
 
 +   r u f f   c h e c k   s r c /   t e s t s /   >   r u f f _ o u t . t x t   2 > & 1   ;   W r i t e - O u t p u t   " E X I T : $ L A S T   . . . 
 
 +   ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 
 
         +   C a t e g o r y I n f o                     :   N o t S p e c i f i e d :   ( w a r n i n g :   E n c o u n . . . d .   ( o s   e r r o r   5 )   
 
       : S t r i n g )   [ ] ,   R e m o t e E x c e p t i o n 
 
         +   F u l l y Q u a l i f i e d E r r o r I d   :   N a t i v e C o m m a n d E r r o r 
 
   
 
 s r c \ s p a n f o r g e \ _ _ i n i t _ _ . p y : 1 2 8 : 1 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
         | 
 
 1 2 6   |       " " " 
 
 1 2 7   | 
 
 1 2 8   |   /   f r o m   _ _ f u t u r e _ _   i m p o r t   a n n o t a t i o n s 
 
 1 2 9   |   | 
 
 1 3 0   |   |   i m p o r t   r e   a s   _ r e 
 
 1 3 1   |   | 
 
 1 3 2   |   |   #   F - 0 1 :   D e r i v e   _ _ v e r s i o n _ _   f r o m   p a c k a g e   m e t a d a t a   s o   p y p r o j e c t . t o m l   i s   t h e 
 
 1 3 3   |   |   #   s i n g l e   s o u r c e   o f   t r u t h .     F a l l s   b a c k   t o   " 0 . 0 . 0 + d e v "   i n   e d i t a b l e   i n s t a l l s 
 
 1 3 4   |   |   #   w h e r e   t h e   m e t a d a t a   m a y   n o t   y e t   b e   w r i t t e n . 
 
 1 3 5   |   |   f r o m   i m p o r t l i b   i m p o r t   i m p o r t _ m o d u l e   a s   _ i m p o r t _ m o d u l e 
 
 1 3 6   |   |   f r o m   i m p o r t l i b . m e t a d a t a   i m p o r t   P a c k a g e N o t F o u n d E r r o r   a s   _ P a c k a g e N o t F o u n d E r r o r 
 
 1 3 7   |   |   f r o m   i m p o r t l i b . m e t a d a t a   i m p o r t   v e r s i o n   a s   _ p k g _ v e r s i o n 
 
 1 3 8   |   |   f r o m   p a t h l i b   i m p o r t   P a t h   a s   _ P a t h 
 
 1 3 9   |   | 
 
 1 4 0   |   |   f r o m   s p a n f o r g e . _ a n s i   i m p o r t   B O L D ,   C Y A N ,   G R E E N ,   R E D ,   R E S E T ,   Y E L L O W ,   s t r i p _ a n s i 
 
 1 4 1   |   |   f r o m   s p a n f o r g e . _ a n s i   i m p o r t   c o l o r   a s   a n s i _ c o l o r 
 
 1 4 2   |   |   f r o m   s p a n f o r g e . _ b a t c h _ e x p o r t e r   i m p o r t   B a t c h E x p o r t e r ,   g e t _ a g g r e g a t e _ h e a l t h 
 
 1 4 3   |   | 
 
 1 4 4   |   |   #   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 1 4 5   |   |   #   P h a s e   5 :   H o o k   r e g i s t r y 
 
 1 4 6   |   |   #   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 1 4 7   |   |   f r o m   s p a n f o r g e . _ h o o k s   i m p o r t   A s y n c H o o k F n ,   H o o k R e g i s t r y ,   h o o k s 
 
 1 4 8   |   |   f r o m   s p a n f o r g e . _ s e r v e r   i m p o r t   T r a c e V i e w e r S e r v e r 
 
 1 4 9   |   |   f r o m   s p a n f o r g e . _ s p a n   i m p o r t   ( 
 
 1 5 0   |   |           A g e n t R u n C o n t e x t , 
 
 1 5 1   |   |           A g e n t R u n C o n t e x t M a n a g e r , 
 
 1 5 2   |   |           A g e n t S t e p C o n t e x t , 
 
 1 5 3   |   |           A g e n t S t e p C o n t e x t M a n a g e r , 
 
 1 5 4   |   |           S p a n , 
 
 1 5 5   |   |           S p a n C o n t e x t M a n a g e r , 
 
 1 5 6   |   |           c o p y _ c o n t e x t , 
 
 1 5 7   |   |           e x t r a c t _ t r a c e p a r e n t , 
 
 1 5 8   |   |           i n j e c t _ t r a c e p a r e n t , 
 
 1 5 9   |   |   ) 
 
 1 6 0   |   |   f r o m   s p a n f o r g e . _ s t o r e   i m p o r t   ( 
 
 1 6 1   |   |           T r a c e S t o r e , 
 
 1 6 2   |   |           g e t _ l a s t _ a g e n t _ r u n , 
 
 1 6 3   |   |           g e t _ s t o r e , 
 
 1 6 4   |   |           g e t _ t r a c e , 
 
 1 6 5   |   |           l i s t _ l l m _ c a l l s , 
 
 1 6 6   |   |           l i s t _ t o o l _ c a l l s , 
 
 1 6 7   |   |           t r a c e _ s t o r e , 
 
 1 6 8   |   |   ) 
 
 1 6 9   |   |   f r o m   s p a n f o r g e . _ s t r e a m   i m p o r t   f l u s h ,   s h u t d o w n 
 
 1 7 0   |   | 
 
 1 7 1   |   |   #   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 1 7 2   |   |   #   P h a s e   1 :   T r a c e   o b j e c t   a n d   s t a r t _ t r a c e ( ) 
 
 1 7 3   |   |   #   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 1 7 4   |   |   f r o m   s p a n f o r g e . _ t r a c e   i m p o r t   T r a c e ,   s t a r t _ t r a c e 
 
 1 7 5   |   | 
 
 1 7 6   |   |   #   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 1 7 7   |   |   #   P h a s e   2 :   C o r e   t r a c e r   +   s p a n 
 
 1 7 8   |   |   #   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 1 7 9   |   |   f r o m   s p a n f o r g e . _ t r a c e r   i m p o r t   T r a c e r ,   t r a c e r 
 
 1 8 0   |   |   f r o m   s p a n f o r g e . a c t o r   i m p o r t   A c t o r C o n t e x t 
 
 1 8 1   |   | 
 
 1 8 2   |   |   #   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 1 8 3   |   |   #   P h a s e   1 :   C o n f i g u r a t i o n   l a y e r 
 
 1 8 4   |   |   #   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 1 8 5   |   |   f r o m   s p a n f o r g e . c o n f i g   i m p o r t   S p a n F o r g e C o n f i g ,   c o n f i g u r e ,   g e t _ c o n f i g ,   i n t e r p o l a t e _ e n v 
 
 1 8 6   |   | 
 
 1 8 7   |   |   #   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 1 8 8   |   |   #   T . R . U . S . T .   F r a m e w o r k       C o n s e n t ,   H I T L ,   M o d e l   R e g i s t r y ,   E x p l a i n a b i l i t y 
 
 1 8 9   |   |   #   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 1 9 0   |   |   f r o m   s p a n f o r g e . c o n s e n t   i m p o r t   ( 
 
 1 9 1   |   |           C o n s e n t B o u n d a r y , 
 
 1 9 2   |   |           C o n s e n t R e c o r d , 
 
 1 9 3   |   |           c h e c k _ c o n s e n t , 
 
 1 9 4   |   |           g r a n t _ c o n s e n t , 
 
 1 9 5   |   |           r e v o k e _ c o n s e n t , 
 
 1 9 6   |   |   ) 
 
 1 9 7   |   |   f r o m   s p a n f o r g e . c o n s u m e r   i m p o r t   ( 
 
 1 9 8   |   |           C o n s u m e r R e c o r d , 
 
 1 9 9   |   |           C o n s u m e r R e g i s t r y , 
 
 2 0 0   |   |           I n c o m p a t i b l e S c h e m a E r r o r , 
 
 2 0 1   |   |           a s s e r t _ c o m p a t i b l e , 
 
 2 0 2   |   |           r e g i s t e r _ c o n s u m e r , 
 
 2 0 3   |   |   ) 
 
 2 0 4   |   |   f r o m   s p a n f o r g e . c o n s u m e r   i m p o r t   ( 
 
 2 0 5   |   |           g e t _ r e g i s t r y   a s   g e t _ c o n s u m e r _ r e g i s t r y , 
 
 2 0 6   |   |   ) 
 
 2 0 7   |   |   f r o m   s p a n f o r g e . c o s t   i m p o r t   ( 
 
 2 0 8   |   |           B u d g e t M o n i t o r , 
 
 2 0 9   |   |           C o s t R e c o r d , 
 
 2 1 0   |   |           C o s t T r a c k e r , 
 
 2 1 1   |   |           b u d g e t _ a l e r t , 
 
 2 1 2   |   |           c o s t _ s u m m a r y , 
 
 2 1 3   |   |           e m i t _ c o s t _ a t t r i b u t e d , 
 
 2 1 4   |   |           e m i t _ c o s t _ e v e n t , 
 
 2 1 5   |   |   ) 
 
 2 1 6   |   |   f r o m   s p a n f o r g e . e v a l   i m p o r t   ( 
 
 2 1 7   |   |           B e h a v i o u r S c o r e r , 
 
 2 1 8   |   |           E v a l R e p o r t , 
 
 2 1 9   |   |           E v a l R u n n e r , 
 
 2 2 0   |   |           E v a l S c o r e , 
 
 2 2 1   |   |           E v a l S c o r e r , 
 
 2 2 2   |   |           F a i t h f u l n e s s S c o r e r , 
 
 2 2 3   |   |           P I I L e a k a g e S c o r e r , 
 
 2 2 4   |   |           R e f u s a l D e t e c t i o n S c o r e r , 
 
 2 2 5   |   |           R e g r e s s i o n D e t e c t o r , 
 
 2 2 6   |   |           r e c o r d _ e v a l _ s c o r e , 
 
 2 2 7   |   |   ) 
 
 2 2 8   |   |   f r o m   s p a n f o r g e . e v e n t   i m p o r t   S C H E M A _ V E R S I O N ,   E v e n t ,   T a g s 
 
 2 2 9   |   |   f r o m   s p a n f o r g e . e x c e p t i o n s   i m p o r t   ( 
 
 2 3 0   |   |           A u d i t S t o r a g e E r r o r , 
 
 2 3 1   |   |           D e s e r i a l i z a t i o n E r r o r , 
 
 2 3 2   |   |           E g r e s s V i o l a t i o n E r r o r , 
 
 2 3 3   |   |           E v e n t T y p e E r r o r , 
 
 2 3 4   |   |           E x p o r t E r r o r , 
 
 2 3 5   |   |           L L M S c h e m a E r r o r , 
 
 2 3 6   |   |           S c h e m a V a l i d a t i o n E r r o r , 
 
 2 3 7   |   |           S c h e m a V e r s i o n E r r o r , 
 
 2 3 8   |   |           S e r i a l i z a t i o n E r r o r , 
 
 2 3 9   |   |           S i g n i n g E r r o r , 
 
 2 4 0   |   |           U L I D E r r o r , 
 
 2 4 1   |   |           V e r i f i c a t i o n E r r o r , 
 
 2 4 2   |   |   ) 
 
 2 4 3   |   |   f r o m   s p a n f o r g e . e x p l a i n   i m p o r t   ( 
 
 2 4 4   |   |           E x p l a i n a b i l i t y R e c o r d , 
 
 2 4 5   |   |           g e n e r a t e _ e x p l a n a t i o n , 
 
 2 4 6   |   |   ) 
 
 2 4 7   |   |   f r o m   s p a n f o r g e . g o v e r n a n c e   i m p o r t   ( 
 
 2 4 8   |   |           E v e n t G o v e r n a n c e P o l i c y , 
 
 2 4 9   |   |           G o v e r n a n c e V i o l a t i o n E r r o r , 
 
 2 5 0   |   |           G o v e r n a n c e W a r n i n g , 
 
 2 5 1   |   |           c h e c k _ e v e n t , 
 
 2 5 2   |   |           g e t _ g l o b a l _ p o l i c y , 
 
 2 5 3   |   |           g o v e r n e d , 
 
 2 5 4   |   |           s e t _ g l o b a l _ p o l i c y , 
 
 2 5 5   |   |   ) 
 
 2 5 6   |   |   f r o m   s p a n f o r g e . s d k . e x p l a i n   i m p o r t   ( 
 
 2 5 7   |   |           E U A I A c t C l a u s e , 
 
 2 5 8   |   |           E x p l a i n R e c o r d , 
 
 2 5 9   |   |           M o d e l O u t p u t T y p e , 
 
 2 6 0   |   |   ) 
 
 2 6 1   |   |   f r o m   s p a n f o r g e . s d k . s c o p e   i m p o r t   ( 
 
 2 6 2   |   |           A C T I O N _ C A T E G O R I E S , 
 
 2 6 3   |   |           S c o p e M a n i f e s t , 
 
 2 6 4   |   |           S c o p e S t a t u s I n f o , 
 
 2 6 5   |   |           S F S c o p e C l i e n t , 
 
 2 6 6   |   |   ) 
 
 2 6 7   |   |   f r o m   s p a n f o r g e . s d k . v a l i d a t e   i m p o r t   ( 
 
 2 6 8   |   |           S F V a l i d a t e C l i e n t , 
 
 2 6 9   |   |           V a l i d a t e S t a t u s I n f o , 
 
 2 7 0   |   |           V a l i d a t i o n R e s u l t , 
 
 2 7 1   |   |           V i o l a t i o n , 
 
 2 7 2   |   |   ) 
 
 2 7 3   |   |   f r o m   s p a n f o r g e . e x p o r t   i m p o r t   ( 
 
 2 7 4   |   |           A p p e n d O n l y J S O N L E x p o r t e r , 
 
 2 7 5   |   |           J S O N L E x p o r t e r , 
 
 2 7 6   |   |           O p e n I n f e r e n c e S p a n B r i d g e , 
 
 2 7 7   |   |           O T e l B r i d g e E x p o r t e r , 
 
 2 7 8   |   |           O T L P E x p o r t e r , 
 
 2 7 9   |   |           R e s o u r c e A t t r i b u t e s , 
 
 2 8 0   |   |           S p l u n k H E C E x p o r t e r , 
 
 2 8 1   |   |           S y s l o g E x p o r t e r , 
 
 2 8 2   |   |           W e b h o o k E x p o r t e r , 
 
 2 8 3   |   |           W O R M B a c k e n d , 
 
 2 8 4   |   |           W O R M U p l o a d R e s u l t , 
 
 2 8 5   |   |           e v e n t _ t o _ s i e m _ r e c o r d , 
 
 2 8 6   |   |           s p a n _ t o _ o p e n i n f e r e n c e _ d i c t , 
 
 2 8 7   |   |   ) 
 
 2 8 8   |   |   f r o m   s p a n f o r g e . e x p o r t . o t l p _ b r i d g e   i m p o r t   S p a n O T L P B r i d g e ,   s p a n _ t o _ o t l p _ d i c t 
 
 2 8 9   |   |   f r o m   s p a n f o r g e . h i t l   i m p o r t   ( 
 
 2 9 0   |   |           H I T L I t e m , 
 
 2 9 1   |   |           H I T L Q u e u e , 
 
 2 9 2   |   |           l i s t _ p e n d i n g , 
 
 2 9 3   |   |           q u e u e _ f o r _ r e v i e w , 
 
 2 9 4   |   |           r e v i e w _ i t e m , 
 
 2 9 5   |   |   ) 
 
 2 9 6   |   |   f r o m   s p a n f o r g e . i o   i m p o r t   a p p e n d _ j s o n l ,   r e a d _ e v e n t s ,   r e a d _ j s o n l ,   w r i t e _ e v e n t s ,   w r i t e _ j s o n l 
 
 2 9 7   |   | 
 
 2 9 8   |   |   #   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 2 9 9   |   |   #   W o r k f l o w   E n g i n e   ( C O R E - 1 5 )       h u m a n - i n - t h e - l o o p   a p p r o v a l   w o r k f l o w s 
 
 3 0 0   |   |   #   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 3 0 1   |   |   f r o m   s p a n f o r g e . w o r k f l o w   i m p o r t   ( 
 
 3 0 2   |   |           A c t i o n N o t A l l o w e d E r r o r , 
 
 3 0 3   |   |           I n v a l i d T r a n s i t i o n E r r o r , 
 
 3 0 4   |   |           R o l e C o n f i g , 
 
 3 0 5   |   |           S L A B r e a c h E r r o r , 
 
 3 0 6   |   |           S L A S t a t u s , 
 
 3 0 7   |   |           W o r k f l o w A c t i o n , 
 
 3 0 8   |   |           W o r k f l o w A u d i t E n t r y , 
 
 3 0 9   |   |           W o r k f l o w E n g i n e , 
 
 3 1 0   |   |           W o r k f l o w N o t i f i c a t i o n H o o k , 
 
 3 1 1   |   |           W o r k f l o w R e g i s t r y , 
 
 3 1 2   |   |           W o r k f l o w S t a t e , 
 
 3 1 3   |   |           W o r k f l o w T y p e , 
 
 3 1 4   |   |   ) 
 
 3 1 5   |   | 
 
 3 1 6   |   |   #   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 3 1 7   |   |   #   N a m e s p a c e   p a y l o a d   d a t a c l a s s e s   ( R F C   ,% 8 - ,% 1 0 ,   ,% 1 1   a u d i t ) 
 
 3 1 8   |   |   #   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 3 1 9   |   |   f r o m   s p a n f o r g e . n a m e s p a c e s . a u d i t   i m p o r t   ( 
 
 3 2 0   |   |           A u d i t C h a i n T a m p e r e d P a y l o a d , 
 
 3 2 1   |   |           A u d i t C h a i n V e r i f i e d P a y l o a d , 
 
 3 2 2   |   |           A u d i t K e y R o t a t e d P a y l o a d , 
 
 3 2 3   |   |   ) 
 
 3 2 4   |   |   f r o m   s p a n f o r g e . n a m e s p a c e s . c a c h e   i m p o r t   ( 
 
 3 2 5   |   |           C a c h e E v i c t e d P a y l o a d , 
 
 3 2 6   |   |           C a c h e H i t P a y l o a d , 
 
 3 2 7   |   |           C a c h e M i s s P a y l o a d , 
 
 3 2 8   |   |           C a c h e W r i t t e n P a y l o a d , 
 
 3 2 9   |   |   ) 
 
 3 3 0   |   |   f r o m   s p a n f o r g e . n a m e s p a c e s . c o n s e n t   i m p o r t   C o n s e n t P a y l o a d 
 
 3 3 1   |   |   f r o m   s p a n f o r g e . n a m e s p a c e s . c o s t   i m p o r t   ( 
 
 3 3 2   |   |           C o s t A t t r i b u t e d P a y l o a d , 
 
 3 3 3   |   |           C o s t S e s s i o n R e c o r d e d P a y l o a d , 
 
 3 3 4   |   |           C o s t T o k e n R e c o r d e d P a y l o a d , 
 
 3 3 5   |   |   ) 
 
 3 3 6   |   |   f r o m   s p a n f o r g e . n a m e s p a c e s . d i f f   i m p o r t   ( 
 
 3 3 7   |   |           D i f f C o m p u t e d P a y l o a d , 
 
 3 3 8   |   |           D i f f R e g r e s s i o n F l a g g e d P a y l o a d , 
 
 3 3 9   |   |   ) 
 
 3 4 0   |   |   f r o m   s p a n f o r g e . n a m e s p a c e s . e v a l _   i m p o r t   ( 
 
 3 4 1   |   |           E v a l R e g r e s s i o n D e t e c t e d P a y l o a d , 
 
 3 4 2   |   |           E v a l S c e n a r i o C o m p l e t e d P a y l o a d , 
 
 3 4 3   |   |           E v a l S c e n a r i o S t a r t e d P a y l o a d , 
 
 3 4 4   |   |           E v a l S c o r e R e c o r d e d P a y l o a d , 
 
 3 4 5   |   |   ) 
 
 3 4 6   |   |   f r o m   s p a n f o r g e . n a m e s p a c e s . f e n c e   i m p o r t   ( 
 
 3 4 7   |   |           F e n c e M a x R e t r i e s E x c e e d e d P a y l o a d , 
 
 3 4 8   |   |           F e n c e R e t r y T r i g g e r e d P a y l o a d , 
 
 3 4 9   |   |           F e n c e V a l i d a t e d P a y l o a d , 
 
 3 5 0   |   |   ) 
 
 3 5 1   |   |   f r o m   s p a n f o r g e . n a m e s p a c e s . g u a r d   i m p o r t   G u a r d P a y l o a d 
 
 3 5 2   |   |   f r o m   s p a n f o r g e . n a m e s p a c e s . h i t l   i m p o r t   H I T L P a y l o a d 
 
 3 5 3   |   |   f r o m   s p a n f o r g e . n a m e s p a c e s . p r o m p t   i m p o r t   ( 
 
 3 5 4   |   |           P r o m p t R e n d e r e d P a y l o a d , 
 
 3 5 5   |   |           P r o m p t T e m p l a t e L o a d e d P a y l o a d , 
 
 3 5 6   |   |           P r o m p t V e r s i o n C h a n g e d P a y l o a d , 
 
 3 5 7   |   |   ) 
 
 3 5 8   |   |   f r o m   s p a n f o r g e . n a m e s p a c e s . r e d a c t   i m p o r t   ( 
 
 3 5 9   |   |           R e d a c t A p p l i e d P a y l o a d , 
 
 3 6 0   |   |           R e d a c t P h i D e t e c t e d P a y l o a d , 
 
 3 6 1   |   |           R e d a c t P i i D e t e c t e d P a y l o a d , 
 
 3 6 2   |   |   ) 
 
 3 6 3   |   |   f r o m   s p a n f o r g e . n a m e s p a c e s . t e m p l a t e   i m p o r t   ( 
 
 3 6 4   |   |           T e m p l a t e R e g i s t e r e d P a y l o a d , 
 
 3 6 5   |   |           T e m p l a t e V a l i d a t i o n F a i l e d P a y l o a d , 
 
 3 6 6   |   |           T e m p l a t e V a r i a b l e B o u n d P a y l o a d , 
 
 3 6 7   |   |   ) 
 
 3 6 8   |   |   f r o m   s p a n f o r g e . n a m e s p a c e s . t r a c e   i m p o r t   ( 
 
 3 6 9   |   |           A g e n t R u n P a y l o a d , 
 
 3 7 0   |   |           A g e n t S t e p P a y l o a d , 
 
 3 7 1   |   |           C o s t B r e a k d o w n , 
 
 3 7 2   |   |           D e c i s i o n P o i n t , 
 
 3 7 3   |   |           G e n A I O p e r a t i o n N a m e , 
 
 3 7 4   |   |           G e n A I S y s t e m , 
 
 3 7 5   |   |           M o d e l I n f o , 
 
 3 7 6   |   |           P r i c i n g T i e r , 
 
 3 7 7   |   |           R e a s o n i n g S t e p , 
 
 3 7 8   |   |           S p a n E v e n t , 
 
 3 7 9   |   |           S p a n K i n d , 
 
 3 8 0   |   |           S p a n P a y l o a d , 
 
 3 8 1   |   |           T o k e n U s a g e , 
 
 3 8 2   |   |           T o o l C a l l , 
 
 3 8 3   |   |   ) 
 
 3 8 4   |   |   f r o m   s p a n f o r g e . n o r m a l i z e r   i m p o r t   G e n e r i c N o r m a l i z e r ,   P r o v i d e r N o r m a l i z e r 
 
 3 8 5   |   |   f r o m   s p a n f o r g e . p l u g i n s   i m p o r t   d i s c o v e r   a s   d i s c o v e r _ p l u g i n s 
 
 3 8 6   |   |   f r o m   s p a n f o r g e . p r o c e s s o r   i m p o r t   ( 
 
 3 8 7   |   |           N o o p S p a n P r o c e s s o r , 
 
 3 8 8   |   |           P r o c e s s o r C h a i n , 
 
 3 8 9   |   |           S p a n P r o c e s s o r , 
 
 3 9 0   |   |           a d d _ p r o c e s s o r , 
 
 3 9 1   |   |           c l e a r _ p r o c e s s o r s , 
 
 3 9 2   |   |   ) 
 
 3 9 3   |   |   f r o m   s p a n f o r g e . r e d a c t   i m p o r t   ( 
 
 3 9 4   |   |           D P D P _ P A T T E R N S , 
 
 3 9 5   |   |           P I I _ T Y P E S , 
 
 3 9 6   |   |           P I I N o t R e d a c t e d E r r o r , 
 
 3 9 7   |   |           P I I S c a n R e s u l t , 
 
 3 9 8   |   |           R e d a c t a b l e , 
 
 3 9 9   |   |           R e d a c t i o n P o l i c y , 
 
 4 0 0   |   |           R e d a c t i o n R e s u l t , 
 
 4 0 1   |   |           S e n s i t i v i t y , 
 
 4 0 2   |   |           a s s e r t _ r e d a c t e d , 
 
 4 0 3   |   |           c o n t a i n s _ p i i , 
 
 4 0 4   |   |           s c a n _ p a y l o a d , 
 
 4 0 5   |   |   ) 
 
 4 0 6   |   |   f r o m   s p a n f o r g e . r e g r e s s i o n   i m p o r t   R e g r e s s i o n D e t e c t o r   a s   P a s s F a i l R e g r e s s i o n D e t e c t o r 
 
 4 0 7   |   |   f r o m   s p a n f o r g e . r e g r e s s i o n   i m p o r t   R e g r e s s i o n R e p o r t 
 
 4 0 8   |   |   f r o m   s p a n f o r g e . r e g r e s s i o n   i m p o r t   c o m p a r e   a s   c o m p a r e _ r e g r e s s i o n s 
 
 4 0 9   |   |   f r o m   s p a n f o r g e . s a m p l i n g   i m p o r t   ( 
 
 4 1 0   |   |           A l w a y s O f f S a m p l e r , 
 
 4 1 1   |   |           A l w a y s O n S a m p l e r , 
 
 4 1 2   |   |           C o m p l i a n c e S a m p l e r , 
 
 4 1 3   |   |           P a r e n t B a s e d S a m p l e r , 
 
 4 1 4   |   |           R a t i o S a m p l e r , 
 
 4 1 5   |   |           R u l e B a s e d S a m p l e r , 
 
 4 1 6   |   |           S a m p l e r , 
 
 4 1 7   |   |           T a i l B a s e d S a m p l e r , 
 
 4 1 8   |   |           b y p a s s _ s a m p l i n g , 
 
 4 1 9   |   |   ) 
 
 4 2 0   |   |   f r o m   s p a n f o r g e . s c h e m a   i m p o r t   S c h e m a V a l i d a t i o n E r r o r   a s   J s o n S c h e m a V a l i d a t i o n E r r o r 
 
 4 2 1   |   |   f r o m   s p a n f o r g e . s c h e m a   i m p o r t   v a l i d a t e   a s   v a l i d a t e _ j s o n _ s c h e m a 
 
 4 2 2   |   |   f r o m   s p a n f o r g e . s c h e m a   i m p o r t   v a l i d a t e _ s t r i c t   a s   v a l i d a t e _ j s o n _ s c h e m a _ s t r i c t 
 
 4 2 3   |   |   f r o m   s p a n f o r g e . s i g n i n g   i m p o r t   ( 
 
 4 2 4   |   |           A s y n c A u d i t S t r e a m , 
 
 4 2 5   |   |           A u d i t S t r e a m , 
 
 4 2 6   |   |           C h a i n V e r i f i c a t i o n R e s u l t , 
 
 4 2 7   |   |           D i c t K e y R e s o l v e r , 
 
 4 2 8   |   |           E n v K e y R e s o l v e r , 
 
 4 2 9   |   |           K e y R e s o l v e r , 
 
 4 3 0   |   |           S t a t i c K e y R e s o l v e r , 
 
 4 3 1   |   |           a s s e r t _ v e r i f i e d , 
 
 4 3 2   |   |           c h e c k _ k e y _ e x p i r y , 
 
 4 3 3   |   |           d e r i v e _ k e y , 
 
 4 3 4   |   |           s i g n , 
 
 4 3 5   |   |           v a l i d a t e _ k e y _ s t r e n g t h , 
 
 4 3 6   |   |           v e r i f y , 
 
 4 3 7   |   |           v e r i f y _ c h a i n , 
 
 4 3 8   |   |   ) 
 
 4 3 9   |   |   f r o m   s p a n f o r g e . s t a t s   i m p o r t   l a t e n c y _ s u m m a r y ,   p e r c e n t i l e 
 
 4 4 0   |   |   f r o m   s p a n f o r g e . s t r e a m   i m p o r t   E v e n t S t r e a m ,   E x p o r t e r ,   a i t e r _ f i l e ,   i t e r _ f i l e 
 
 4 4 1   |   |   f r o m   s p a n f o r g e . t r a c e   i m p o r t   t r a c e 
 
 4 4 2   |   |   f r o m   s p a n f o r g e . t y p e s   i m p o r t   ( 
 
 4 4 3   |   |           E v e n t T y p e , 
 
 4 4 4   |   |           S p a n E r r o r C a t e g o r y , 
 
 4 4 5   |   |           g e t _ b y _ v a l u e , 
 
 4 4 6   |   |           i s _ r e g i s t e r e d , 
 
 4 4 7   |   |           n a m e s p a c e _ o f , 
 
 4 4 8   |   |           v a l i d a t e _ c u s t o m , 
 
 4 4 9   |   |   ) 
 
 4 5 0   |   |   f r o m   s p a n f o r g e . u l i d   i m p o r t   e x t r a c t _ t i m e s t a m p _ m s 
 
 4 5 1   |   |   f r o m   s p a n f o r g e . u l i d   i m p o r t   g e n e r a t e   a s   g e n e r a t e _ u l i d 
 
 4 5 2   |   |   f r o m   s p a n f o r g e . u l i d   i m p o r t   v a l i d a t e   a s   v a l i d a t e _ u l i d 
 
 4 5 3   |   |   f r o m   s p a n f o r g e . v a l i d a t e   i m p o r t   v a l i d a t e _ e v e n t 
 
         |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   I 0 0 1 
 
         | 
 
         =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 s r c \ s p a n f o r g e \ _ c l i . p y : 6 7 : 5 :   F 4 0 1   [ * ]   ` s p a n f o r g e . _ c l i _ c o n f i g . c m d _ c o n f i g _ i n i t `   i m p o r t e d   b u t   u n u s e d 
 
       | 
 
 6 5   |   f r o m   s p a n f o r g e . _ c l i _ c o n f i g   i m p o r t   ( 
 
 6 6   |           a d d _ s e c r e t s _ s u b c o m m a n d s , 
 
 6 7   |           c m d _ c o n f i g _ i n i t , 
 
       |           ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   F 4 0 1 
 
 6 8   |           c m d _ c o n f i g _ v a l i d a t e , 
 
 6 9   |           c m d _ d e v _ r e s e t , 
 
       | 
 
       =   h e l p :   R e m o v e   u n u s e d   i m p o r t 
 
 
 
 s r c \ s p a n f o r g e \ _ c l i . p y : 6 8 : 5 :   F 4 0 1   [ * ]   ` s p a n f o r g e . _ c l i _ c o n f i g . c m d _ c o n f i g _ v a l i d a t e `   i m p o r t e d   b u t   u n u s e d 
 
       | 
 
 6 6   |           a d d _ s e c r e t s _ s u b c o m m a n d s , 
 
 6 7   |           c m d _ c o n f i g _ i n i t , 
 
 6 8   |           c m d _ c o n f i g _ v a l i d a t e , 
 
       |           ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   F 4 0 1 
 
 6 9   |           c m d _ d e v _ r e s e t , 
 
 7 0   |           d i s p a t c h _ s e c r e t s _ c o m m a n d , 
 
       | 
 
       =   h e l p :   R e m o v e   u n u s e d   i m p o r t 
 
 
 
 s r c \ s p a n f o r g e \ _ c l i . p y : 6 3 2 : 9 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
         | 
 
 6 3 0   |               #   V a l i d a t e   e v e n t   t y p e 
 
 6 3 1   |               t r y : 
 
 6 3 2   |   /                   f r o m   s p a n f o r g e . v a l i d a t e   i m p o r t   v a l i d a t e _ e v e n t 
 
 6 3 3   |   |                   f r o m   s p a n f o r g e . e x c e p t i o n s   i m p o r t   S c h e m a V a l i d a t i o n E r r o r 
 
         |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   I 0 0 1 
 
 6 3 4   |                       t e s t _ e v e n t   =   E v e n t ( 
 
 6 3 5   |                               e v e n t _ t y p e = e v e n t _ t y p e , 
 
         | 
 
         =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 s r c \ s p a n f o r g e \ _ c l i . p y : 6 7 0 : 5 :   P L R 5 5 0 1   [ * ]   U s e   ` e l i f `   i n s t e a d   o f   ` e l s e `   t h e n   ` i f ` ,   t o   r e d u c e   i n d e n t a t i o n 
 
         | 
 
 6 6 8   |                                               f h . w r i t e ( " \ n " ) 
 
 6 6 9   |                       p r i n t ( f " [   ]   { c o u n t }   e v e n t ( s )   w r i t t e n   t o   { o u t _ p a t h } " ) 
 
 6 7 0   |   /           e l s e : 
 
 6 7 1   |   |                   i f   o u t p u t _ f o r m a t   = =   " j s o n " : 
 
         |   | _ _ _ _ _ _ _ _ ^   P L R 5 5 0 1 
 
 6 7 2   |                               p r i n t ( j s o n . d u m p s ( g e n e r a t e d ,   i n d e n t = 2 ) ) 
 
 6 7 3   |                       e l s e : 
 
         | 
 
         =   h e l p :   C o n v e r t   t o   ` e l i f ` 
 
 
 
 s r c \ s p a n f o r g e \ _ c l i . p y : 7 7 1 : 3 1 :   R U F 1 0 0   [ * ]   U n u s e d   ` n o q a `   d i r e c t i v e   ( n o n - e n a b l e d :   ` B L E 0 0 1 ` ) 
 
         | 
 
 7 6 9   |           t r y : 
 
 7 7 0   |                   r e p o r t   =   s c a n _ d a t a s e t _ c o m p l i a n c e ( d a t a s e t _ p a t h ,   s i g n = s i g n ) 
 
 7 7 1   |           e x c e p t   E x c e p t i o n   a s   e x c :     #   n o q a :   B L E 0 0 1 
 
         |                                                               ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   R U F 1 0 0 
 
 7 7 2   |                   p r i n t ( f " e r r o r :   d a t a s e t   s c a n   f a i l e d :   { e x c } " ,   f i l e = s y s . s t d e r r ) 
 
 7 7 3   |                   r e t u r n   1 
 
         | 
 
         =   h e l p :   R e m o v e   u n u s e d   ` n o q a `   d i r e c t i v e 
 
 
 
 s r c \ s p a n f o r g e \ _ c l i . p y : 9 6 6 : 1 7 :   P L W 3 3 0 1   N e s t e d   ` m a x `   c a l l s   c a n   b e   f l a t t e n e d 
 
         | 
 
 9 6 5   |           i f   g r o u p _ c o u n t s : 
 
 9 6 6   |                   c o l _ w   =   m a x ( l e n ( g r o u p _ l a b e l ) ,   m a x ( l e n ( k )   f o r   k   i n   g r o u p _ c o u n t s ) )   +   2 
 
         |                                   ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L W 3 3 0 1 
 
 9 6 7   |                   p r i n t ( f "     { g r o u p _ l a b e l : < { c o l _ w } }   { ' C o u n t ' : > 7 } " ) 
 
 9 6 8   |                   p r i n t ( "     "   +   " - "   *   ( c o l _ w   +   9 ) ) 
 
         | 
 
         =   h e l p :   F l a t t e n   n e s t e d   ` m a x `   c a l l s 
 
 
 
 s r c \ s p a n f o r g e \ _ c l i . p y : 1 9 4 5 : 3 9 :   R U F 1 0 0   [ * ]   U n u s e d   ` n o q a `   d i r e c t i v e   ( n o n - e n a b l e d :   ` B L E 0 0 1 ` ) 
 
           | 
 
 1 9 4 3   |                                   p r i n t ( e x p o r t e r . e x p o r t ( e v e n t ) ) 
 
 1 9 4 4   |                                   c o u n t   + =   1 
 
 1 9 4 5   |                           e x c e p t   E x c e p t i o n   a s   e x c :     #   n o q a :   B L E 0 0 1 
 
           |                                                                               ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   R U F 1 0 0 
 
 1 9 4 6   |                                   p r i n t ( f " [ ! ]   S k i p p i n g   i n v a l i d   e v e n t :   { e x c } " ,   f i l e = s y s . s t d e r r ) 
 
 1 9 4 7   |                                   e r r o r s   + =   1 
 
           | 
 
           =   h e l p :   R e m o v e   u n u s e d   ` n o q a `   d i r e c t i v e 
 
 
 
 s r c \ s p a n f o r g e \ _ c l i _ a u d i t . p y : 1 1 0 3 : 2 2 :   F 4 0 1   [ * ]   ` i o `   i m p o r t e d   b u t   u n u s e d 
 
           | 
 
 1 1 0 2   |           d e f   _ w r i t e _ o u t p u t ( f h :   o b j e c t )   - >   N o n e : 
 
 1 1 0 3   |                   i m p o r t   i o   a s   _ i o 
 
           |                                             ^ ^ ^   F 4 0 1 
 
 1 1 0 4   |                   _ f h   =   f h     #   t y p e :   i g n o r e [ a s s i g n m e n t ] 
 
 1 1 0 5   |                   i f   o u t p u t _ f o r m a t   = =   " j s o n " : 
 
           | 
 
           =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` i o ` 
 
 
 
 s r c \ s p a n f o r g e \ _ c l i _ a u d i t . p y : 1 4 5 1 : 2 2 :   F 4 0 1   [ * ]   ` i o `   i m p o r t e d   b u t   u n u s e d 
 
           | 
 
 1 4 5 0   |           d e f   _ w r i t e _ o u t p u t ( f h :   o b j e c t )   - >   N o n e : 
 
 1 4 5 1   |                   i m p o r t   i o   a s   _ i o 
 
           |                                             ^ ^ ^   F 4 0 1 
 
 1 4 5 2   |                   _ f h   =   f h     #   t y p e :   i g n o r e [ a s s i g n m e n t ] 
 
 1 4 5 3   |                   i f   o u t p u t _ f o r m a t   = =   " j s o n " : 
 
           | 
 
           =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` i o ` 
 
 
 
 s r c \ s p a n f o r g e \ _ c l i _ c o m p l i a n c e . p y : 1 0 9 : 3 1 :   R U F 1 0 0   [ * ]   U n u s e d   ` n o q a `   d i r e c t i v e   ( n o n - e n a b l e d :   ` B L E 0 0 1 ` ) 
 
         | 
 
 1 0 7   |           t r y : 
 
 1 0 8   |                   r e p o r t   =   s c a n _ d a t a s e t _ c o m p l i a n c e ( d a t a s e t _ p a t h ,   s i g n = s i g n ) 
 
 1 0 9   |           e x c e p t   E x c e p t i o n   a s   e x c :     #   n o q a :   B L E 0 0 1 
 
         |                                                               ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   R U F 1 0 0 
 
 1 1 0   |                   p r i n t ( f " e r r o r :   d a t a s e t   s c a n   f a i l e d :   { e x c } " ,   f i l e = s y s . s t d e r r ) 
 
 1 1 1   |                   r e t u r n   1 
 
         | 
 
         =   h e l p :   R e m o v e   u n u s e d   ` n o q a `   d i r e c t i v e 
 
 
 
 s r c \ s p a n f o r g e \ _ c l i _ o p s . p y : 1 0 1 7 : 1 3 :   B 0 0 7   L o o p   c o n t r o l   v a r i a b l e   ` l i n e n o `   n o t   u s e d   w i t h i n   l o o p   b o d y 
 
           | 
 
 1 0 1 5   |           p a r s e _ e r r o r s   =   0 
 
 1 0 1 6   |           w i t h   s o u r c e _ p a t h . o p e n ( e n c o d i n g = " u t f - 8 " )   a s   f h : 
 
 1 0 1 7   |                   f o r   l i n e n o ,   l i n e   i n   e n u m e r a t e ( f h ,   1 ) : 
 
           |                           ^ ^ ^ ^ ^ ^   B 0 0 7 
 
 1 0 1 8   |                           l i n e   =   l i n e . s t r i p ( ) 
 
 1 0 1 9   |                           i f   n o t   l i n e : 
 
           | 
 
           =   h e l p :   R e n a m e   u n u s e d   ` l i n e n o `   t o   ` _ l i n e n o ` 
 
 
 
 s r c \ s p a n f o r g e \ _ c l i _ o p s . p y : 1 0 4 1 : 3 7 :   P E R F 4 0 1   U s e   ` l i s t . e x t e n d `   t o   c r e a t e   a   t r a n s f o r m e d   l i s t 
 
           | 
 
 1 0 3 9   |                                                           f o r   g r   i n   r e s u l t . g a t e _ r e s u l t s : 
 
 1 0 4 0   |                                                                   i f   n o t   g r . p a s s e d : 
 
 1 0 4 1   |                                                                           f a i l e d _ g a t e s . a p p e n d ( g e t a t t r ( g r ,   " g a t e _ i d " ,   s t r ( g r ) ) ) 
 
           |                                                                           ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P E R F 4 0 1 
 
 1 0 4 2   |                                                   v i o l a t i o n s . a p p e n d ( { 
 
 1 0 4 3   |                                                           " e v e n t _ i n d e x " :   i , 
 
           | 
 
           =   h e l p :   R e p l a c e   f o r   l o o p   w i t h   l i s t . e x t e n d 
 
 
 
 s r c \ s p a n f o r g e \ _ c l i _ o p s . p y : 1 2 0 6 : 9 :   S 1 1 2   ` t r y ` - ` e x c e p t ` - ` c o n t i n u e `   d e t e c t e d ,   c o n s i d e r   l o g g i n g   t h e   e x c e p t i o n 
 
           | 
 
 1 2 0 4   |                       t r y : 
 
 1 2 0 5   |                               d a t a   =   _ j s o n . l o a d s ( p . r e a d _ t e x t ( e n c o d i n g = " u t f - 8 " ) ) 
 
 1 2 0 6   |   /                   e x c e p t   E x c e p t i o n : 
 
 1 2 0 7   |   |                           c o n t i n u e 
 
           |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   S 1 1 2 
 
 1 2 0 8   |                       r u n s . a p p e n d ( { 
 
 1 2 0 9   |                               " g a t e _ i d " :   d a t a . g e t ( " g a t e _ i d " ,   p . s t e m . r e p l a c e ( " _ r e s u l t " ,   " " ) ) , 
 
           | 
 
 
 
 s r c \ s p a n f o r g e \ c o r e \ c o m p l i a n c e _ m a p p i n g . p y : 3 3 4 : 9 :   F 6 0 1   D i c t i o n a r y   k e y   l i t e r a l   ` " A r t . 1 3 " `   r e p e a t e d 
 
         | 
 
 3 3 2   |                           ) , 
 
 3 3 3   |                   } , 
 
 3 3 4   |                   " A r t . 1 3 " :   { 
 
         |                   ^ ^ ^ ^ ^ ^ ^ ^   F 6 0 1 
 
 3 3 5   |                           " t i t l e " :   " H i g h - R i s k   A I   S y s t e m s   - -   T r a n s p a r e n c y " , 
 
 3 3 6   |                           " e v e n t _ p r e f i x e s " :   [ " l l m . t r a c e . " ,   " l l m . e v a l . " ,   " e x p l a n a t i o n . " ] , 
 
         | 
 
         =   h e l p :   R e m o v e   r e p e a t e d   k e y   l i t e r a l   ` " A r t . 1 3 " ` 
 
 
 
 s r c \ s p a n f o r g e \ c o r e \ c o m p l i a n c e _ m a p p i n g . p y : 7 1 2 : 9 :   D 4 1 6   [ * ]   S e c t i o n   n a m e   s h o u l d   e n d   w i t h   a   c o l o n   ( " R e t u r n s " ) 
 
         | 
 
 7 1 0   |                           C o n t r o l / c l a u s e   i d e n t i f i e r ,   e . g .   ` ` " 6 . 1 " ` ` . 
 
 7 1 1   | 
 
 7 1 2   |                   R e t u r n s 
 
         |                   ^ ^ ^ ^ ^ ^ ^   D 4 1 6 
 
 7 1 3   |                   - - - - - - - 
 
 7 1 4   |                   l i s t [ t u p l e [ s t r ,   s t r ] ] 
 
         | 
 
         =   h e l p :   A d d   c o l o n   t o   " R e t u r n s " 
 
 
 
 s r c \ s p a n f o r g e \ c o r e \ c o m p l i a n c e _ m a p p i n g . p y : 7 1 8 : 9 :   D 4 1 6   [ * ]   S e c t i o n   n a m e   s h o u l d   e n d   w i t h   a   c o l o n   ( " E x a m p l e " ) 
 
         | 
 
 7 1 6   |                           E m p t y   l i s t   i f   n o   c r o s s - r e f e r e n c e s   e x i s t   f o r   t h i s   c o n t r o l . 
 
 7 1 7   | 
 
 7 1 8   |                   E x a m p l e 
 
         |                   ^ ^ ^ ^ ^ ^ ^   D 4 1 6 
 
 7 1 9   |                   - - - - - - - 
 
 7 2 0   |                   : : 
 
         | 
 
         =   h e l p :   A d d   c o l o n   t o   " E x a m p l e " 
 
 
 
 s r c \ s p a n f o r g e \ c o r e \ c o m p l i a n c e _ m a p p i n g . p y : 1 2 4 7 : 6 9 :   F 8 2 1   U n d e f i n e d   n a m e   ` _ M I N _ P A S S _ T H R E S H O L D ` 
 
           | 
 
 1 2 4 5   |                           p r e f i x e s :   l i s t [ s t r ]   =   c l a u s e _ i n f o [ " e v e n t _ p r e f i x e s " ] 
 
 1 2 4 6   |                           #   P e r - c l a u s e   m i n i m u m ,   f a l l i n g   b a c k   t o   g l o b a l   d e f a u l t 
 
 1 2 4 7   |                           c l a u s e _ m i n :   i n t   =   c l a u s e _ i n f o . g e t ( " m i n _ e v e n t _ c o u n t " )   o r   _ M I N _ P A S S _ T H R E S H O L D 
 
           |                                                                                                                                           ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   F 8 2 1 
 
 1 2 4 8   |                           #   O p t i o n a l   r o l l i n g   t i m e   w i n d o w   ( h o u r s )   s c o p e d   t o   t h i s   c l a u s e 
 
 1 2 4 9   |                           t w _ h o u r s :   i n t   |   N o n e   =   c l a u s e _ i n f o . g e t ( " t i m e _ w i n d o w _ h o u r s " ) 
 
           | 
 
 
 
 s r c \ s p a n f o r g e \ c o r e \ d x . p y : 7 : 1 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
       | 
 
   5   |       " " " 
 
   6   | 
 
   7   |   /   f r o m   _ _ f u t u r e _ _   i m p o r t   a n n o t a t i o n s 
 
   8   |   | 
 
   9   |   |   i m p o r t   t e x t w r a p 
 
 1 0   |   |   f r o m   d a t a c l a s s e s   i m p o r t   d a t a c l a s s ,   f i e l d 
 
 1 1   |   |   f r o m   p a t h l i b   i m p o r t   P a t h 
 
       |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   I 0 0 1 
 
       | 
 
       =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 s r c \ s p a n f o r g e \ c o r e \ d x . p y : 1 1 1 : 9 :   D 4 1 6   [ * ]   S e c t i o n   n a m e   s h o u l d   e n d   w i t h   a   c o l o n   ( " R e t u r n s " ) 
 
         | 
 
 1 0 9   |                           D e f a u l t s   t o   t h e   c u r r e n t   w o r k i n g   d i r e c t o r y . 
 
 1 1 0   | 
 
 1 1 1   |                   R e t u r n s 
 
         |                   ^ ^ ^ ^ ^ ^ ^   D 4 1 6 
 
 1 1 2   |                   - - - - - - - 
 
 1 1 3   |                   S c a f f o l d R e s u l t 
 
         | 
 
         =   h e l p :   A d d   c o l o n   t o   " R e t u r n s " 
 
 
 
 s r c \ s p a n f o r g e \ c o r e \ d x . p y : 1 2 2 : 3 4 :   P T H 2 0 1   [ * ]   D o   n o t   p a s s   t h e   c u r r e n t   d i r e c t o r y   e x p l i c i t l y   t o   ` P a t h ` 
 
         | 
 
 1 2 0   |                           ) 
 
 1 2 1   | 
 
 1 2 2   |                   r o o t   =   ( b a s e _ d i r   o r   P a t h ( " . " ) )   /   m o d u l e _ n a m e 
 
         |                                                                     ^ ^ ^   P T H 2 0 1 
 
 1 2 3   |                   f i l e s :   d i c t [ s t r ,   s t r ]   =   { 
 
 1 2 4   |                           " _ _ i n i t _ _ . p y " :   s e l f . _ r e n d e r _ i n i t ( m o d u l e _ n a m e ,   t r u s t _ l e v e l ,   a u t h o r ) , 
 
         | 
 
         =   h e l p :   R e m o v e   t h e   c u r r e n t   d i r e c t o r y   a r g u m e n t 
 
 
 
 s r c \ s p a n f o r g e \ g o v e r n a n c e . p y : 2 4 5 : 3 2 :   R U F 1 0 0   [ * ]   U n u s e d   ` n o q a `   d i r e c t i v e   ( n o n - e n a b l e d :   ` B L E 0 0 1 ` ) 
 
         | 
 
 2 4 3   |                                   } 
 
 2 4 4   |                                   s f _ e x p l a i n . e x p l a i n ( r e s u l t ,   c o n t e x t ) 
 
 2 4 5   |                           e x c e p t   E x c e p t i o n :     #   n o q a :   B L E 0 0 1 
 
         |                                                                 ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   R U F 1 0 0 
 
 2 4 6   |                                   _ g o v _ l o g . w a r n i n g ( 
 
 2 4 7   |                                           " g o v e r n e d :   s f _ e x p l a i n . e x p l a i n ( )   f a i l e d   f o r   % s ;   c o n t i n u i n g . " , 
 
         | 
 
         =   h e l p :   R e m o v e   u n u s e d   ` n o q a `   d i r e c t i v e 
 
 
 
 s r c \ s p a n f o r g e \ m i g r a t e . p y : 1 4 8 : 1 0 1 :   E 5 0 1   L i n e   t o o   l o n g   ( 1 1 4   >   1 0 0 ) 
 
         | 
 
 1 4 6   |                           " { ' p r o m p t _ t o k e n s ' :   N ,   ' c o m p l e t i o n _ t o k e n s ' :   N ,   ' t o t a l _ t o k e n s ' :   N } . " 
 
 1 4 7   |                   ) , 
 
 1 4 8   |                   " f i e l d _ r e n a m e s " :   { " p r o m p t _ t o k e n s " :   " u s a g e . p r o m p t _ t o k e n s " ,   " c o m p l e t i o n _ t o k e n s " :   " u s a g e . c o m p l e t i o n _ t o k e n s " } , 
 
         |                                                                                                                                                                                                           ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   E 5 0 1 
 
 1 4 9   |                   " e f f o r t " :   " m e d i u m " , 
 
 1 5 0   |           } , 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ m i g r a t e . p y : 1 5 9 : 6 9 :   R U F 0 0 1   S t r i n g   c o n t a i n s   a m b i g u o u s   `   `   ( E N   D A S H ) .   D i d   y o u   m e a n   ` - `   ( H Y P H E N - M I N U S ) ? 
 
         | 
 
 1 5 7   |                   " m i g r a t i o n _ n o t e s " :   ( 
 
 1 5 8   |                           " R e p l a c e   ' h a l l u c i n a t i o n . c h e c k . v 0 '   w i t h   ' h a l l u c i n a t i o n . c h e c k . c o m p l e t e d ' .   " 
 
 1 5 9   |                           " T h e   ' s c o r e '   f i e l d   i s   n o w   ' h a l l u c i n a t i o n _ s c o r e '   ( f l o a t   0   1 ) .   " 
 
         |                                                                                                                                           ^   R U F 0 0 1 
 
 1 6 0   |                           " T h e   ' i s _ h a l l u c i n a t e d '   b o o l e a n   f i e l d   i s   n o w   ' v e r d i c t '   ( s t r i n g :   p a s s / f a i l / r e v i e w ) . " 
 
 1 6 1   |                   ) , 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ m i g r a t e . p y : 2 3 3 : 5 9 :   P L R 2 0 0 4   M a g i c   v a l u e   u s e d   i n   c o m p a r i s o n ,   c o n s i d e r   r e p l a c i n g   ` 1 2 0 `   w i t h   a   c o n s t a n t   v a r i a b l e 
 
         | 
 
 2 3 1   |                                   i f   n o t   n o t i c e . r e p l a c e m e n t : 
 
 2 3 2   |                                           e f f o r t   =   " h i g h " 
 
 2 3 3   |                                   e l i f   n o t i c e . n o t e s   a n d   l e n ( n o t i c e . n o t e s )   >   1 2 0 : 
 
         |                                                                                                                       ^ ^ ^   P L R 2 0 0 4 
 
 2 3 4   |                                           e f f o r t   =   " m e d i u m " 
 
 2 3 5   |                                   e l s e : 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ p r e s i d i o _ b a c k e n d . p y : 1 4 5 : 2 4 :   R U F 1 0 0   [ * ]   U n u s e d   ` n o q a `   d i r e c t i v e   ( n o n - e n a b l e d :   ` B L E 0 0 1 ` ) 
 
         | 
 
 1 4 3   |                   _ g e t _ a n a l y z e r ( ) 
 
 1 4 4   |                   _ a n a l y z e r _ a v a i l a b l e   =   T r u e 
 
 1 4 5   |           e x c e p t   E x c e p t i o n :     #   n o q a :   B L E 0 0 1       I m p o r t E r r o r ,   O S E r r o r ,   V a l u e E r r o r ,   e t c . 
 
         |                                                 ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   R U F 1 0 0 
 
 1 4 6   |                   _ a n a l y z e r _ a v a i l a b l e   =   F a l s e 
 
 1 4 7   |           r e t u r n   _ a n a l y z e r _ a v a i l a b l e 
 
         | 
 
         =   h e l p :   R e m o v e   u n u s e d   ` n o q a `   d i r e c t i v e 
 
 
 
 s r c \ s p a n f o r g e \ p r e s i d i o _ b a c k e n d . p y : 2 5 9 : 4 2 :   P L R 2 0 0 4   M a g i c   v a l u e   u s e d   i n   c o m p a r i s o n ,   c o n s i d e r   r e p l a c i n g   ` 4 `   w i t h   a   c o n s t a n t   v a r i a b l e 
 
         | 
 
 2 5 7   |                                           p a r t s   =   m a t c h e d . s p l i t ( " . " ) 
 
 2 5 8   |                                           t r y : 
 
 2 5 9   |                                                   i f   l e n ( p a r t s )   ! =   4   o r   n o t   a l l ( 0   < =   i n t ( p )   < =   2 5 5   f o r   p   i n   p a r t s ) : 
 
         |                                                                                     ^   P L R 2 0 0 4 
 
 2 6 0   |                                                           r e t u r n   F a l s e 
 
 2 6 1   |                                           e x c e p t   V a l u e E r r o r : 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ p r e s i d i o _ b a c k e n d . p y : 2 5 9 : 7 0 :   P L R 2 0 0 4   M a g i c   v a l u e   u s e d   i n   c o m p a r i s o n ,   c o n s i d e r   r e p l a c i n g   ` 2 5 5 `   w i t h   a   c o n s t a n t   v a r i a b l e 
 
         | 
 
 2 5 7   |                                           p a r t s   =   m a t c h e d . s p l i t ( " . " ) 
 
 2 5 8   |                                           t r y : 
 
 2 5 9   |                                                   i f   l e n ( p a r t s )   ! =   4   o r   n o t   a l l ( 0   < =   i n t ( p )   < =   2 5 5   f o r   p   i n   p a r t s ) : 
 
         |                                                                                                                                             ^ ^ ^   P L R 2 0 0 4 
 
 2 6 0   |                                                           r e t u r n   F a l s e 
 
 2 6 1   |                                           e x c e p t   V a l u e E r r o r : 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s c h e m a s \ _ _ i n i t _ _ . p y : 1 9 : 1 1 :   R U F 0 2 2   ` _ _ a l l _ _ `   i s   n o t   s o r t e d 
 
       | 
 
 1 7   |       f r o m   _ _ f u t u r e _ _   i m p o r t   a n n o t a t i o n s 
 
 1 8   | 
 
 1 9   |       _ _ a l l _ _   =   [ 
 
       |     _ _ _ _ _ _ _ _ _ _ _ ^ 
 
 2 0   |   |           #   C o r e   t r a c e   /   t e l e m e t r y 
 
 2 1   |   |           " T R A C E _ V 1 " , 
 
 2 2   |   |           #   P I I   &   s e c r e t s 
 
 2 3   |   |           " P I I _ V 1 " , 
 
 2 4   |   |           " S E C R E T S _ V 1 " , 
 
 2 5   |   |           #   A u d i t 
 
 2 6   |   |           " A U D I T _ V 1 " , 
 
 2 7   |   |           " C O N S E N T _ V 1 " , 
 
 2 8   |   |           #   C o m p l i a n c e   E v i d e n c e   C h a i n 
 
 2 9   |   |           " S C O R E _ V 1 " , 
 
 3 0   |   |           " B I A S _ V 1 " , 
 
 3 1   |   |           " P R R I _ V 1 " , 
 
 3 2   |   |           " D R I F T _ V 1 " , 
 
 3 3   |   |           #   G a t e 
 
 3 4   |   |           " G A T E _ V 1 " , 
 
 3 5   |   |           #   T r u s t 
 
 3 6   |   |           " T R U S T _ V 1 " , 
 
 3 7   |   |           #   A l e r t i n g 
 
 3 8   |   |           " A L E R T _ V 1 " , 
 
 3 9   |   |   ] 
 
       |   | _ ^   R U F 0 2 2 
 
 4 0   | 
 
 4 1   |       #   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
       | 
 
       =   h e l p :   A p p l y   a n   i s o r t - s t y l e   s o r t i n g   t o   ` _ _ a l l _ _ ` 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ _ _ i n i t _ _ . p y : 3 9 : 1 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
         | 
 
   3 7   |       " " " 
 
   3 8   | 
 
   3 9   |   /   f r o m   _ _ f u t u r e _ _   i m p o r t   a n n o t a t i o n s 
 
   4 0   |   | 
 
   4 1   |   |   f r o m   s p a n f o r g e . s d k . _ b a s e   i m p o r t   S F C l i e n t C o n f i g 
 
   4 2   |   |   f r o m   s p a n f o r g e . s d k . _ e x c e p t i o n s   i m p o r t   ( 
 
   4 3   |   |           #   P h a s e   1 1       E n t e r p r i s e   H a r d e n i n g   &   S u p p l y   C h a i n   S e c u r i t y 
 
   4 4   |   |           S F A i r G a p E r r o r , 
 
   4 5   |   |           S F A l e r t E r r o r , 
 
   4 6   |   |           S F A l e r t P u b l i s h E r r o r , 
 
   4 7   |   |           S F A l e r t Q u e u e F u l l E r r o r , 
 
   4 8   |   |           S F A l e r t R a t e L i m i t e d E r r o r , 
 
   4 9   |   |           S F A u d i t A p p e n d E r r o r , 
 
   5 0   |   |           S F A u d i t E r r o r , 
 
   5 1   |   |           S F A u d i t Q u e r y E r r o r , 
 
   5 2   |   |           S F A u d i t S c h e m a E r r o r , 
 
   5 3   |   |           S F A u t h E r r o r , 
 
   5 4   |   |           S F B r u t e F o r c e L o c k e d E r r o r , 
 
   5 5   |   |           S F C E C B u i l d E r r o r , 
 
   5 6   |   |           S F C E C E r r o r , 
 
   5 7   |   |           S F C E C E x p o r t E r r o r , 
 
   5 8   |   |           S F C E C V e r i f y E r r o r , 
 
   5 9   |   |           S F C o n f i g E r r o r , 
 
   6 0   |   |           S F C o n f i g V a l i d a t i o n E r r o r , 
 
   6 1   |   |           S F D a t a R e s i d e n c y E r r o r , 
 
   6 2   |   |           S F E n c r y p t i o n E r r o r , 
 
   6 3   |   |           S F E n t e r p r i s e E r r o r , 
 
   6 4   |   |           S F E r r o r , 
 
   6 5   |   |           S F F I P S E r r o r , 
 
   6 6   |   |           S F G a t e E r r o r , 
 
   6 7   |   |           S F G a t e E v a l u a t i o n E r r o r , 
 
   6 8   |   |           S F G a t e P i p e l i n e E r r o r , 
 
   6 9   |   |           S F G a t e S c h e m a E r r o r , 
 
   7 0   |   |           S F G a t e T r u s t F a i l e d E r r o r , 
 
   7 1   |   |           S F I P D e n i e d E r r o r , 
 
   7 2   |   |           S F I s o l a t i o n E r r o r , 
 
   7 3   |   |           S F K e y F o r m a t E r r o r , 
 
   7 4   |   |           S F M F A R e q u i r e d E r r o r , 
 
   7 5   |   |           S F O b s e r v e A n n o t a t i o n E r r o r , 
 
   7 6   |   |           S F O b s e r v e E m i t E r r o r , 
 
   7 7   |   |           S F O b s e r v e E r r o r , 
 
   7 8   |   |           S F O b s e r v e E x p o r t E r r o r , 
 
   7 9   |   |           S F P I I B l o c k e d E r r o r , 
 
   8 0   |   |           S F P I I D P D P C o n s e n t M i s s i n g E r r o r , 
 
   8 1   |   |           S F P I I E r r o r , 
 
   8 2   |   |           S F P I I N o t R e d a c t e d E r r o r , 
 
   8 3   |   |           S F P I I P o l i c y E r r o r , 
 
   8 4   |   |           S F P I I S c a n E r r o r , 
 
   8 5   |   |           S F P i p e l i n e E r r o r , 
 
   8 6   |   |           S F Q u o t a E x c e e d e d E r r o r , 
 
   8 7   |   |           S F R a t e L i m i t E r r o r , 
 
   8 8   |   |           S F S c o p e E r r o r , 
 
   8 9   |   |           S F S e c r e t s B l o c k e d E r r o r , 
 
   9 0   |   |           S F S e c r e t s E r r o r , 
 
   9 1   |   |           S F S e c r e t s I n L o g s E r r o r , 
 
   9 2   |   |           S F S e c r e t s S c a n E r r o r , 
 
   9 3   |   |           S F S e c u r i t y S c a n E r r o r , 
 
   9 4   |   |           S F S e r v i c e U n a v a i l a b l e E r r o r , 
 
   9 5   |   |           S F S t a r t u p E r r o r , 
 
   9 6   |   |           S F T o k e n I n v a l i d E r r o r , 
 
   9 7   |   |           S F T r u s t C o m p u t e E r r o r , 
 
   9 8   |   |           S F T r u s t E r r o r , 
 
   9 9   |   |           S F T r u s t G a t e F a i l e d E r r o r , 
 
 1 0 0   |   |           S F V a l i d a t e E r r o r , 
 
 1 0 1   |   |           S F V a l i d a t e P i p e l i n e E r r o r , 
 
 1 0 2   |   |   ) 
 
 1 0 3   |   |   f r o m   s p a n f o r g e . s d k . d a t a s e t _ s c a n n e r   i m p o r t   ( 
 
 1 0 4   |   |           A r t i c l e 1 0 C l a u s e , 
 
 1 0 5   |   |           D a t a s e t C o m p l i a n c e R e p o r t , 
 
 1 0 6   |   |           s c a n _ d a t a s e t _ c o m p l i a n c e , 
 
 1 0 7   |   |   ) 
 
 1 0 8   |   |   f r o m   s p a n f o r g e . s d k . _ t y p e s   i m p o r t   ( 
 
 1 0 9   |   |           #   P h a s e   1 1       E n t e r p r i s e   H a r d e n i n g   &   S u p p l y   C h a i n   S e c u r i t y 
 
 1 1 0   |   |           A i r G a p C o n f i g , 
 
 1 1 1   |   |           A l e r t R e c o r d , 
 
 1 1 2   |   |           A l e r t S e v e r i t y , 
 
 1 1 3   |   |           A l e r t S t a t u s I n f o , 
 
 1 1 4   |   |           A n n o t a t i o n , 
 
 1 1 5   |   |           A P I K e y B u n d l e , 
 
 1 1 6   |   |           A r t i c l e 3 0 R e c o r d , 
 
 1 1 7   |   |           A u d i t A p p e n d R e s u l t , 
 
 1 1 8   |   |           A u d i t S t a t u s I n f o , 
 
 1 1 9   |   |           B u n d l e R e s u l t , 
 
 1 2 0   |   |           B u n d l e V e r i f i c a t i o n R e s u l t , 
 
 1 2 1   |   |           C E C S t a t u s I n f o , 
 
 1 2 2   |   |           C l a u s e M a p E n t r y , 
 
 1 2 3   |   |           C l a u s e S a t i s f a c t i o n , 
 
 1 2 4   |   |           C o m p o s i t e G a t e I n p u t , 
 
 1 2 5   |   |           C o m p o s i t e G a t e R e s u l t , 
 
 1 2 6   |   |           D a t a R e s i d e n c y , 
 
 1 2 7   |   |           D e p e n d e n c y V u l n e r a b i l i t y , 
 
 1 2 8   |   |           D e p l o y m e n t A r c h i t e c t u r e R e f e r e n c e , 
 
 1 2 9   |   |           D e p l o y m e n t P r o f i l e , 
 
 1 3 0   |   |           D P A D o c u m e n t , 
 
 1 3 1   |   |           D S A R E x p o r t , 
 
 1 3 2   |   |           D S A R R e s u l t , 
 
 1 3 3   |   |           E n c r y p t i o n C o n f i g , 
 
 1 3 4   |   |           E n t e r p r i s e E v i d e n c e P a c k a g e , 
 
 1 3 5   |   |           E n t e r p r i s e S t a t u s I n f o , 
 
 1 3 6   |   |           E r a s u r e R e c e i p t , 
 
 1 3 7   |   |           E x p o r t R e s u l t , 
 
 1 3 8   |   |           G a t e A r t i f a c t , 
 
 1 3 9   |   |           G a t e E v a l u a t i o n R e s u l t , 
 
 1 4 0   |   |           G a t e S t a t u s I n f o , 
 
 1 4 1   |   |           G a t e V e r d i c t , 
 
 1 4 2   |   |           H e a l t h E n d p o i n t R e s u l t , 
 
 1 4 3   |   |           I s o l a t i o n S c o p e , 
 
 1 4 4   |   |           J W T C l a i m s , 
 
 1 4 5   |   |           K e y F o r m a t , 
 
 1 4 6   |   |           K e y S c o p e , 
 
 1 4 7   |   |           M a g i c L i n k R e s u l t , 
 
 1 4 8   |   |           M a i n t e n a n c e W i n d o w , 
 
 1 4 9   |   |           O b s e r v e S t a t u s I n f o , 
 
 1 5 0   |   |           P I I A n o n y m i s e d R e s u l t , 
 
 1 5 1   |   |           P I I E n t i t y , 
 
 1 5 2   |   |           P I I H e a t M a p E n t r y , 
 
 1 5 3   |   |           P I I P i p e l i n e R e s u l t , 
 
 1 5 4   |   |           P I I R e d a c t i o n M a n i f e s t E n t r y , 
 
 1 5 5   |   |           P I I S t a t u s I n f o , 
 
 1 5 6   |   |           P I I T e x t S c a n R e s u l t , 
 
 1 5 7   |   |           P i p e l i n e R e s u l t , 
 
 1 5 8   |   |           P R R I R e s u l t , 
 
 1 5 9   |   |           P R R I V e r d i c t , 
 
 1 6 0   |   |           P u b l i s h R e s u l t , 
 
 1 6 1   |   |           Q u o t a T i e r , 
 
 1 6 2   |   |           R a t e L i m i t I n f o , 
 
 1 6 3   |   |           R e c e i v e r C o n f i g , 
 
 1 6 4   |   |           R e t e n t i o n E x p o r t P o l i c y , 
 
 1 6 5   |   |           S a f e H a r b o r R e s u l t , 
 
 1 6 6   |   |           S a m p l e r S t r a t e g y , 
 
 1 6 7   |   |           S e c r e t S t r , 
 
 1 6 8   |   |           S e c u r i t y A u d i t R e s u l t , 
 
 1 6 9   |   |           S e c u r i t y S c a n R e s u l t , 
 
 1 7 0   |   |           S F P I I A n o n y m i z e R e s u l t , 
 
 1 7 1   |   |           S F P I I H i t , 
 
 1 7 2   |   |           S F P I I R e d a c t R e s u l t , 
 
 1 7 3   |   |           S F P I I S c a n R e s u l t , 
 
 1 7 4   |   |           S i g n e d R e c o r d , 
 
 1 7 5   |   |           S t a t i c A n a l y s i s F i n d i n g , 
 
 1 7 6   |   |           T e n a n t C o n f i g , 
 
 1 7 7   |   |           T h r e a t M o d e l E n t r y , 
 
 1 7 8   |   |           T o k e n I n t r o s p e c t i o n R e s u l t , 
 
 1 7 9   |   |           T o p i c R e g i s t r a t i o n , 
 
 1 8 0   |   |           T O T P E n r o l l R e s u l t , 
 
 1 8 1   |   |           T r a i n i n g D a t a P I I R e p o r t , 
 
 1 8 2   |   |           T r u s t B a d g e R e s u l t , 
 
 1 8 3   |   |           T r u s t D i m e n s i o n , 
 
 1 8 4   |   |           T r u s t D i m e n s i o n W e i g h t s , 
 
 1 8 5   |   |           T r u s t G a t e R e s u l t , 
 
 1 8 6   |   |           T r u s t H i s t o r y E n t r y , 
 
 1 8 7   |   |           T r u s t S c o r e c a r d , 
 
 1 8 8   |   |           T r u s t S c o r e c a r d R e s p o n s e , 
 
 1 8 9   |   |           T r u s t S t a t u s I n f o , 
 
 1 9 0   |   |   ) 
 
 1 9 1   |   |   f r o m   s p a n f o r g e . s d k . a l e r t   i m p o r t   S F A l e r t C l i e n t 
 
 1 9 2   |   |   f r o m   s p a n f o r g e . s d k . a u d i t   i m p o r t   S F A u d i t C l i e n t ,   S F C o m p o s i t e A u d i t S i n k 
 
 1 9 3   |   |   f r o m   s p a n f o r g e . s d k . c e c   i m p o r t   S F C E C C l i e n t 
 
 1 9 4   |   |   f r o m   s p a n f o r g e . s d k . c o n f i g   i m p o r t   ( 
 
 1 9 5   |   |           S F C o n f i g B l o c k , 
 
 1 9 6   |   |           S F L o c a l F a l l b a c k C o n f i g , 
 
 1 9 7   |   |           S F P I I C o n f i g , 
 
 1 9 8   |   |           S F S e c r e t s C o n f i g , 
 
 1 9 9   |   |           S F S e r v i c e T o g g l e s , 
 
 2 0 0   |   |           l o a d _ c o n f i g _ f i l e , 
 
 2 0 1   |   |           v a l i d a t e _ c o n f i g , 
 
 2 0 2   |   |           v a l i d a t e _ c o n f i g _ s t r i c t , 
 
 2 0 3   |   |   ) 
 
 2 0 4   |   |   f r o m   s p a n f o r g e . s d k . e n t e r p r i s e   i m p o r t   S F E n t e r p r i s e C l i e n t 
 
 2 0 5   |   |   f r o m   s p a n f o r g e . s d k . e x p l a i n   i m p o r t   E x p l a i n S t a t u s I n f o ,   S F E x p l a i n C l i e n t 
 
 2 0 6   |   |   f r o m   s p a n f o r g e . s d k . f a l l b a c k   i m p o r t   ( 
 
 2 0 7   |   |           a l e r t _ f a l l b a c k , 
 
 2 0 8   |   |           a u d i t _ f a l l b a c k , 
 
 2 0 9   |   |           c e c _ f a l l b a c k , 
 
 2 1 0   |   |           g a t e _ f a l l b a c k , 
 
 2 1 1   |   |           i d e n t i t y _ f a l l b a c k , 
 
 2 1 2   |   |           o b s e r v e _ f a l l b a c k , 
 
 2 1 3   |   |           p i i _ f a l l b a c k , 
 
 2 1 4   |   |           s e c r e t s _ f a l l b a c k , 
 
 2 1 5   |   |   ) 
 
 2 1 6   |   |   f r o m   s p a n f o r g e . s d k . f e e d b a c k   i m p o r t   F e e d b a c k S t a t u s I n f o ,   S F F e e d b a c k C l i e n t 
 
 2 1 7   |   |   f r o m   s p a n f o r g e . s d k . g a t e   i m p o r t   S F G a t e C l i e n t 
 
 2 1 8   |   |   f r o m   s p a n f o r g e . s d k . i d e n t i t y   i m p o r t   S F I d e n t i t y C l i e n t 
 
 2 1 9   |   |   f r o m   s p a n f o r g e . s d k . l i n e a g e   i m p o r t   L i n e a g e S t a t u s I n f o ,   S F L i n e a g e C l i e n t 
 
 2 2 0   |   |   f r o m   s p a n f o r g e . s d k . o b s e r v e   i m p o r t   S F O b s e r v e C l i e n t 
 
 2 2 1   |   |   f r o m   s p a n f o r g e . s d k . o p e r a t o r   i m p o r t   O p e r a t o r E v i d e n c e P a c k a g e ,   O p e r a t o r W o r k f l o w V i e w ,   S F O p e r a t o r C l i e n t 
 
 2 2 2   |   |   f r o m   s p a n f o r g e . s d k . p i i   i m p o r t   S F P I I C l i e n t 
 
 2 2 3   |   |   f r o m   s p a n f o r g e . s d k . p i p e l i n e s   i m p o r t   ( 
 
 2 2 4   |   |           b e n c h m a r k _ p i p e l i n e , 
 
 2 2 5   |   |           b i a s _ p i p e l i n e , 
 
 2 2 6   |   |           m o n i t o r _ p i p e l i n e , 
 
 2 2 7   |   |           r i s k _ p i p e l i n e , 
 
 2 2 8   |   |           s c o r e _ p i p e l i n e , 
 
 2 2 9   |   |   ) 
 
 2 3 0   |   |   f r o m   s p a n f o r g e . s d k . p o l i c y   i m p o r t   ( 
 
 2 3 1   |   |           R u n t i m e P o l i c y C o m p a r i s o n R e s u l t , 
 
 2 3 2   |   |           R u n t i m e P o l i c y D e c i s i o n , 
 
 2 3 3   |   |           R u n t i m e P o l i c y R e p l a y R e s u l t , 
 
 2 3 4   |   |           R u n t i m e P o l i c y R e v i e w R e c o r d , 
 
 2 3 5   |   |           R u n t i m e P o l i c y S i m u l a t i o n R e s u l t , 
 
 2 3 6   |   |           R u n t i m e P o l i c y S t a t u s I n f o , 
 
 2 3 7   |   |           S F P o l i c y C l i e n t , 
 
 2 3 8   |   |   ) 
 
 2 3 9   |   |   f r o m   s p a n f o r g e . s d k . r a g   i m p o r t   R A G S t a t u s I n f o ,   S F R A G C l i e n t 
 
 2 4 0   |   |   f r o m   s p a n f o r g e . s d k . r b a c   i m p o r t   R B A C M a n i f e s t ,   R B A C S t a t u s I n f o ,   S F R B A C C l i e n t 
 
 2 4 1   |   |   f r o m   s p a n f o r g e . s d k . r e g i s t r y   i m p o r t   S e r v i c e H e a l t h ,   S e r v i c e R e g i s t r y ,   S e r v i c e S t a t u s 
 
 2 4 2   |   |   f r o m   s p a n f o r g e . s d k . s c o p e   i m p o r t   S c o p e M a n i f e s t ,   S c o p e S t a t u s I n f o ,   S F S c o p e C l i e n t 
 
 2 4 3   |   |   f r o m   s p a n f o r g e . s d k . s e c r e t s   i m p o r t   S F S e c r e t s C l i e n t 
 
 2 4 4   |   |   f r o m   s p a n f o r g e . s d k . v a l i d a t e   i m p o r t   S F V a l i d a t e C l i e n t ,   V a l i d a t e S t a t u s I n f o ,   V a l i d a t i o n R e s u l t ,   V i o l a t i o n 
 
 2 4 5   |   |   f r o m   s p a n f o r g e . s d k . s e c u r i t y   i m p o r t   S F S e c u r i t y C l i e n t 
 
 2 4 6   |   |   f r o m   s p a n f o r g e . s d k . t r u s t   i m p o r t   S F T r u s t C l i e n t 
 
 2 4 7   |   |   f r o m   s p a n f o r g e . s d k . _ f a c t o r y   i m p o r t   S F C l i e n t F a c t o r y 
 
 2 4 8   |   |   f r o m   s p a n f o r g e . s d k . _ p i p e l i n e _ b u i l d e r   i m p o r t   S F P i p e l i n e ,   S F P i p e l i n e R e s u l t ,   P i p e l i n e S t a g e E r r o r 
 
 2 4 9   |   |   f r o m   s p a n f o r g e . s e c r e t s   i m p o r t   S e c r e t H i t ,   S e c r e t s S c a n R e s u l t 
 
         |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   I 0 0 1 
 
 2 5 0   | 
 
 2 5 1   |       _ _ a l l _ _   =   [ 
 
         | 
 
         =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ _ e x c e p t i o n s . p y : 4 2 8 : 1 0 1 :   E 5 0 1   L i n e   t o o   l o n g   ( 1 0 5   >   1 0 0 ) 
 
         | 
 
 4 2 6   |           " " " 
 
 4 2 7   | 
 
 4 2 8   |           d e f   _ _ i n i t _ _ ( s e l f ,   s e c r e t _ t y p e s :   l i s t [ s t r ] ,   c o u n t :   i n t   =   1 ,   * ,   t s c _ c r i t e r i o n :   s t r   =   " C C 6 . 7 " )   - >   N o n e : 
 
         |                                                                                                                                                                                                           ^ ^ ^ ^ ^   E 5 0 1 
 
 4 2 9   |                   s e l f . s e c r e t _ t y p e s   =   s e c r e t _ t y p e s 
 
 4 3 0   |                   s e l f . c o u n t   =   c o u n t 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ _ e x c e p t i o n s . p y : 4 7 0 : 1 0 1 :   E 5 0 1   L i n e   t o o   l o n g   ( 1 0 5   >   1 0 0 ) 
 
         | 
 
 4 6 8   |           " " " 
 
 4 6 9   | 
 
 4 7 0   |           d e f   _ _ i n i t _ _ ( s e l f ,   e n t i t y _ t y p e s :   l i s t [ s t r ] ,   c o u n t :   i n t   =   1 ,   * ,   t s c _ c r i t e r i o n :   s t r   =   " C C 6 . 6 " )   - >   N o n e : 
 
         |                                                                                                                                                                                                           ^ ^ ^ ^ ^   E 5 0 1 
 
 4 7 1   |                   s e l f . e n t i t y _ t y p e s   =   e n t i t y _ t y p e s 
 
 4 7 2   |                   s e l f . c o u n t   =   c o u n t 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ _ p i p e l i n e _ b u i l d e r . p y : 2 6 : 1 1 :   R U F 0 2 2   [ * ]   ` _ _ a l l _ _ `   i s   n o t   s o r t e d 
 
       | 
 
 2 4   |   f r o m   t y p i n g   i m p o r t   A n y ,   C a l l a b l e 
 
 2 5   | 
 
 2 6   |   _ _ a l l _ _   =   [ " S F P i p e l i n e " ,   " P i p e l i n e S t a g e E r r o r " ] 
 
       |                       ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   R U F 0 2 2 
 
 2 7   | 
 
 2 8   |   _ l o g   =   l o g g i n g . g e t L o g g e r ( _ _ n a m e _ _ ) 
 
       | 
 
       =   h e l p :   A p p l y   a n   i s o r t - s t y l e   s o r t i n g   t o   ` _ _ a l l _ _ ` 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ _ p i p e l i n e _ b u i l d e r . p y : 1 8 3 : 1 3 :   P E R F 2 0 3   ` t r y ` - ` e x c e p t `   w i t h i n   a   l o o p   i n c u r s   p e r f o r m a n c e   o v e r h e a d 
 
         | 
 
 1 8 1   |                                       o u t p u t s . a p p e n d ( r e s u l t ) 
 
 1 8 2   |                                       _ l o g . d e b u g ( " S F P i p e l i n e   s t a g e   ' % s '   O K " ,   s t a g e _ n a m e ) 
 
 1 8 3   |   /                           e x c e p t   E x c e p t i o n   a s   e x c :     #   n o q a :   B L E 0 0 1 
 
 1 8 4   |   |                                   e r r _ m s g   =   s t r ( e x c ) 
 
 1 8 5   |   |                                   e r r o r s [ s t a g e _ n a m e ]   =   e r r _ m s g 
 
 1 8 6   |   |                                   o u t p u t s . a p p e n d ( N o n e ) 
 
 1 8 7   |   |                                   _ l o g . w a r n i n g ( " S F P i p e l i n e   s t a g e   ' % s '   f a i l e d :   % s " ,   s t a g e _ n a m e ,   e x c ) 
 
 1 8 8   |   |                                   i f   s e l f . _ f a i l _ f a s t : 
 
 1 8 9   |   |                                           r a i s e   P i p e l i n e S t a g e E r r o r ( s t a g e _ n a m e ,   e x c )   f r o m   e x c 
 
         |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   P E R F 2 0 3 
 
 1 9 0   | 
 
 1 9 1   |                       e l a p s e d _ m s   =   ( t i m e . m o n o t o n i c ( )   -   s t a r t )   *   1 0 0 0 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ _ p i p e l i n e _ b u i l d e r . p y : 1 8 3 : 3 9 :   R U F 1 0 0   [ * ]   U n u s e d   ` n o q a `   d i r e c t i v e   ( n o n - e n a b l e d :   ` B L E 0 0 1 ` ) 
 
         | 
 
 1 8 1   |                                   o u t p u t s . a p p e n d ( r e s u l t ) 
 
 1 8 2   |                                   _ l o g . d e b u g ( " S F P i p e l i n e   s t a g e   ' % s '   O K " ,   s t a g e _ n a m e ) 
 
 1 8 3   |                           e x c e p t   E x c e p t i o n   a s   e x c :     #   n o q a :   B L E 0 0 1 
 
         |                                                                               ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   R U F 1 0 0 
 
 1 8 4   |                                   e r r _ m s g   =   s t r ( e x c ) 
 
 1 8 5   |                                   e r r o r s [ s t a g e _ n a m e ]   =   e r r _ m s g 
 
         | 
 
         =   h e l p :   R e m o v e   u n u s e d   ` n o q a `   d i r e c t i v e 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ a u d i t . p y : 4 8 9 : 1 2 :   P L R 2 0 0 4   M a g i c   v a l u e   u s e d   i n   c o m p a r i s o n ,   c o n s i d e r   r e p l a c i n g   ` 0 x 8 0 `   w i t h   a   c o n s t a n t   v a r i a b l e 
 
         | 
 
 4 8 7   |   d e f   _ d e r _ l e n g t h ( n :   i n t )   - >   b y t e s : 
 
 4 8 8   |           " " " R e t u r n   t h e   D E R   l e n g t h   e n c o d i n g   f o r   * n *   b y t e s . " " " 
 
 4 8 9   |           i f   n   <   0 x 8 0 : 
 
         |                         ^ ^ ^ ^   P L R 2 0 0 4 
 
 4 9 0   |                   r e t u r n   b y t e s ( [ n ] ) 
 
 4 9 1   |           i f   n   <   0 x 1 0 0 : 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ a u d i t . p y : 4 9 1 : 1 2 :   P L R 2 0 0 4   M a g i c   v a l u e   u s e d   i n   c o m p a r i s o n ,   c o n s i d e r   r e p l a c i n g   ` 0 x 1 0 0 `   w i t h   a   c o n s t a n t   v a r i a b l e 
 
         | 
 
 4 8 9   |           i f   n   <   0 x 8 0 : 
 
 4 9 0   |                   r e t u r n   b y t e s ( [ n ] ) 
 
 4 9 1   |           i f   n   <   0 x 1 0 0 : 
 
         |                         ^ ^ ^ ^ ^   P L R 2 0 0 4 
 
 4 9 2   |                   r e t u r n   b y t e s ( [ 0 x 8 1 ,   n ] ) 
 
 4 9 3   |           i f   n   <   0 x 1 0 0 0 0 : 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ a u d i t . p y : 4 9 3 : 1 2 :   P L R 2 0 0 4   M a g i c   v a l u e   u s e d   i n   c o m p a r i s o n ,   c o n s i d e r   r e p l a c i n g   ` 0 x 1 0 0 0 0 `   w i t h   a   c o n s t a n t   v a r i a b l e 
 
         | 
 
 4 9 1   |           i f   n   <   0 x 1 0 0 : 
 
 4 9 2   |                   r e t u r n   b y t e s ( [ 0 x 8 1 ,   n ] ) 
 
 4 9 3   |           i f   n   <   0 x 1 0 0 0 0 : 
 
         |                         ^ ^ ^ ^ ^ ^ ^   P L R 2 0 0 4 
 
 4 9 4   |                   r e t u r n   b y t e s ( [ 0 x 8 2 ,   ( n   > >   8 )   &   0 x F F ,   n   &   0 x F F ] ) 
 
 4 9 5   |           r a i s e   V a l u e E r r o r ( f " D E R   l e n g t h   t o o   l a r g e :   { n } " )     #   p r a g m a :   n o   c o v e r 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ a u d i t . p y : 1 0 7 7 : 1 6 :   F 4 0 1   [ * ]   ` s t r u c t `   i m p o r t e d   b u t   u n u s e d 
 
           | 
 
 1 0 7 5   |                           n e t w o r k   c a l l s       t h e   r e q u e s t   f o r m a t   i s   v a l i d a t e d   b y   t h e   u n i t   t e s t s . 
 
 1 0 7 6   |                   " " " 
 
 1 0 7 7   |                   i m p o r t   s t r u c t 
 
           |                                 ^ ^ ^ ^ ^ ^   F 4 0 1 
 
 1 0 7 8   |                   i m p o r t   u r l l i b . e r r o r 
 
 1 0 7 9   |                   i m p o r t   u r l l i b . r e q u e s t 
 
           | 
 
           =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` s t r u c t ` 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ a u d i t . p y : 1 1 1 2 : 1 0 1 :   E 5 0 1   L i n e   t o o   l o n g   ( 1 1 8   >   1 0 0 ) 
 
           | 
 
 1 1 1 0   |                   ] ) 
 
 1 1 1 1   |                   o c t e t _ s t r i n g   =   b y t e s ( [ 0 x 0 4 ,   0 x 2 0 ] )   +   d i g e s t     #   O C T E T   S T R I N G   ( 3 2   b y t e s ) 
 
 1 1 1 2   |                   m e s s a g e _ i m p r i n t   =   b y t e s ( [ 0 x 3 0 ] )   +   _ d e r _ l e n g t h ( l e n ( s h a 2 5 6 _ o i d )   +   l e n ( o c t e t _ s t r i n g ) )   +   s h a 2 5 6 _ o i d   +   o c t e t _ s t r i n g 
 
           |                                                                                                                                                                                                           ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   E 5 0 1 
 
 1 1 1 3   |                   v e r s i o n   =   b y t e s ( [ 0 x 0 2 ,   0 x 0 1 ,   0 x 0 1 ] )                 #   I N T E G E R   1 
 
 1 1 1 4   |                   t s a _ r e q _ b o d y   =   v e r s i o n   +   m e s s a g e _ i m p r i n t 
 
           | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ a u d i t . p y : 1 1 1 9 : 1 5 :   S 3 1 0   A u d i t   U R L   o p e n   f o r   p e r m i t t e d   s c h e m e s .   A l l o w i n g   u s e   o f   ` f i l e : `   o r   c u s t o m   s c h e m e s   i s   o f t e n   u n e x p e c t e d . 
 
           | 
 
 1 1 1 7   |                       #   3 .   P O S T   t o   T S A 
 
 1 1 1 8   |                       u r l   =   t s a _ u r l   o r   s e l f . T S A _ E N D P O I N T S [ 0 ] 
 
 1 1 1 9   |                       r e q   =   u r l l i b . r e q u e s t . R e q u e s t ( 
 
           |     _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^ 
 
 1 1 2 0   |   |                           u r l , 
 
 1 1 2 1   |   |                           d a t a = t s a _ r e q , 
 
 1 1 2 2   |   |                           h e a d e r s = { " C o n t e n t - T y p e " :   " a p p l i c a t i o n / t i m e s t a m p - q u e r y " } , 
 
 1 1 2 3   |   |                           m e t h o d = " P O S T " , 
 
 1 1 2 4   |   |                   ) 
 
           |   | _ _ _ _ _ _ _ _ _ ^   S 3 1 0 
 
 1 1 2 5   |                       t r y : 
 
 1 1 2 6   |                               w i t h   u r l l i b . r e q u e s t . u r l o p e n ( r e q ,   t i m e o u t = t i m e o u t _ s e c o n d s )   a s   r e s p :     #   n o s e c   B 3 1 0 
 
           | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ a u d i t . p y : 1 1 2 6 : 1 8 :   S 3 1 0   A u d i t   U R L   o p e n   f o r   p e r m i t t e d   s c h e m e s .   A l l o w i n g   u s e   o f   ` f i l e : `   o r   c u s t o m   s c h e m e s   i s   o f t e n   u n e x p e c t e d . 
 
           | 
 
 1 1 2 4   |                   ) 
 
 1 1 2 5   |                   t r y : 
 
 1 1 2 6   |                           w i t h   u r l l i b . r e q u e s t . u r l o p e n ( r e q ,   t i m e o u t = t i m e o u t _ s e c o n d s )   a s   r e s p :     #   n o s e c   B 3 1 0 
 
           |                                     ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   S 3 1 0 
 
 1 1 2 7   |                                   s t a t u s   =   r e s p . g e t c o d e ( ) 
 
 1 1 2 8   |                                   b o d y   =   r e s p . r e a d ( ) 
 
           | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ a u d i t . p y : 1 1 3 4 : 2 2 :   P L R 2 0 0 4   M a g i c   v a l u e   u s e d   i n   c o m p a r i s o n ,   c o n s i d e r   r e p l a c i n g   ` 2 0 0 `   w i t h   a   c o n s t a n t   v a r i a b l e 
 
           | 
 
 1 1 3 2   |                           )   f r o m   e x c 
 
 1 1 3 3   | 
 
 1 1 3 4   |                   i f   s t a t u s   ! =   2 0 0   o r   n o t   b o d y : 
 
           |                                             ^ ^ ^   P L R 2 0 0 4 
 
 1 1 3 5   |                           r a i s e   S F A u d i t A p p e n d E r r o r ( 
 
 1 1 3 6   |                                   f " R F C   3 1 6 1   T S A   r e t u r n e d   H T T P   { s t a t u s }   f r o m   { u r l ! r } " 
 
           | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ a u d i t . p y : 1 2 0 5 : 5 :   D 2 0 5   1   b l a n k   l i n e   r e q u i r e d   b e t w e e n   s u m m a r y   l i n e   a n d   d e s c r i p t i o n 
 
           | 
 
 1 2 0 4   |       c l a s s   S F C o m p o s i t e A u d i t S i n k : 
 
 1 2 0 5   |   /           " " " F a n - o u t   a u d i t   s i n k   t h a t   w r i t e s   t o   a n   i n - m e m o r y   : c l a s s : ` ~ s p a n f o r g e . s i g n i n g . A u d i t S t r e a m ` 
 
 1 2 0 6   |   |           a n d   a   r e m o t e   : c l a s s : ` S F A u d i t C l i e n t `   s i m u l t a n e o u s l y . 
 
 1 2 0 7   |   | 
 
 1 2 0 8   |   |           T h e   i n - m e m o r y   s t r e a m   w r i t e   i s   a l w a y s   p e r f o r m e d   a n d   i s   c o n s i d e r e d 
 
 1 2 0 9   |   |           i n f a l l i b l e .     T h e   r e m o t e   c l i e n t   w r i t e   i s   w r a p p e d   i n   a   t r y / e x c e p t ;   o n 
 
 1 2 1 0   |   |           f a i l u r e   a   w a r n i n g   i s   l o g g e d   a n d   t h e   e r r o r   i s   * * n o t * *   r e - r a i s e d   w h e n 
 
 1 2 1 1   |   |           ` ` f a i l _ s i l e n t = T r u e ` `   ( t h e   d e f a u l t ) . 
 
 1 2 1 2   |   | 
 
 1 2 1 3   |   |           A r g s : 
 
 1 2 1 4   |   |                   s t r e a m :             A n   : c l a s s : ` ~ s p a n f o r g e . s i g n i n g . A u d i t S t r e a m `   i n s t a n c e   u s e d 
 
 1 2 1 5   |   |                                             a s   t h e   l o c a l ,   i n - m e m o r y   s t o r e . 
 
 1 2 1 6   |   |                   c l i e n t :             A n   : c l a s s : ` S F A u d i t C l i e n t `   i n s t a n c e   u s e d   a s   t h e   r e m o t e 
 
 1 2 1 7   |   |                                             ( o r   s e c o n d a r y )   s t o r e . 
 
 1 2 1 8   |   |                   f a i l _ s i l e n t :   W h e n   ` ` T r u e ` `   ( d e f a u l t ) ,   r e m o t e   w r i t e   f a i l u r e s   a r e 
 
 1 2 1 9   |   |                                             l o g g e d   a s   w a r n i n g s   b u t   d o   n o t   p r o p a g a t e .     S e t   t o 
 
 1 2 2 0   |   |                                             ` ` F a l s e ` `   t o   r a i s e   o n   a n y   r e m o t e   e r r o r . 
 
 1 2 2 1   |   | 
 
 1 2 2 2   |   |           E x a m p l e : : 
 
 1 2 2 3   |   | 
 
 1 2 2 4   |   |                   f r o m   s p a n f o r g e . s i g n i n g   i m p o r t   A u d i t S t r e a m 
 
 1 2 2 5   |   |                   f r o m   s p a n f o r g e . s d k . a u d i t   i m p o r t   S F A u d i t C l i e n t ,   S F C o m p o s i t e A u d i t S i n k 
 
 1 2 2 6   |   |                   f r o m   s p a n f o r g e . s d k . _ b a s e   i m p o r t   S F C l i e n t C o n f i g 
 
 1 2 2 7   |   | 
 
 1 2 2 8   |   |                   s t r e a m   =   A u d i t S t r e a m ( o r g _ s e c r e t = " k e y " ,   s o u r c e = " s v c @ 1 . 0 . 0 " ) 
 
 1 2 2 9   |   |                   c l i e n t   =   S F A u d i t C l i e n t ( S F C l i e n t C o n f i g . f r o m _ e n v ( ) ) 
 
 1 2 3 0   |   |                   s i n k   =   S F C o m p o s i t e A u d i t S i n k ( s t r e a m ,   c l i e n t ) 
 
 1 2 3 1   |   | 
 
 1 2 3 2   |   |                   r e s u l t   =   s i n k . a p p e n d ( 
 
 1 2 3 3   |   |                           { " h a l l u c i n a t i o n _ s c o r e " :   0 . 2 ,   " m o d e l " :   " g p t - 4 " } , 
 
 1 2 3 4   |   |                           s c h e m a _ k e y = " h a l l u c c h e c k . s c o r e . v 1 " , 
 
 1 2 3 5   |   |                           p r o j e c t _ i d = " m y - p r o j e c t " , 
 
 1 2 3 6   |   |                   ) 
 
 1 2 3 7   |   |           " " " 
 
           |   | _ _ _ _ _ _ _ ^   D 2 0 5 
 
 1 2 3 8   | 
 
 1 2 3 9   |               d e f   _ _ i n i t _ _ ( 
 
           | 
 
           =   h e l p :   I n s e r t   s i n g l e   b l a n k   l i n e 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ a u d i t . p y : 1 2 4 1 : 1 7 :   U P 0 3 7   [ * ]   R e m o v e   q u o t e s   f r o m   t y p e   a n n o t a t i o n 
 
           | 
 
 1 2 3 9   |           d e f   _ _ i n i t _ _ ( 
 
 1 2 4 0   |                   s e l f , 
 
 1 2 4 1   |                   s t r e a m :   " A n y " ,     #   A u d i t S t r e a m       a v o i d   c i r c u l a r   i m p o r t   a t   c l a s s - s c o p e 
 
           |                                   ^ ^ ^ ^ ^   U P 0 3 7 
 
 1 2 4 2   |                   c l i e n t :   S F A u d i t C l i e n t , 
 
 1 2 4 3   |                   * , 
 
           | 
 
           =   h e l p :   R e m o v e   q u o t e s 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ c e c . p y : 1 2 2 2 : 1 0 :   U P 0 3 7   [ * ]   R e m o v e   q u o t e s   f r o m   t y p e   a n n o t a t i o n 
 
           | 
 
 1 2 2 0   |                   * , 
 
 1 2 2 1   |                   p r o j e c t _ i d :   s t r   =   " " , 
 
 1 2 2 2   |           )   - >   " E x p o r t R e s u l t " : 
 
           |                     ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   U P 0 3 7 
 
 1 2 2 3   |                   " " " W r i t e   a   s i g n e d   l o c a l   N D J S O N   e v i d e n c e   b u n d l e   w i t h o u t   c l o u d   c o n n e c t i v i t y . 
 
           | 
 
           =   h e l p :   R e m o v e   q u o t e s 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ c e c . p y : 1 2 2 2 : 1 1 :   F 8 2 1   U n d e f i n e d   n a m e   ` E x p o r t R e s u l t ` 
 
           | 
 
 1 2 2 0   |                   * , 
 
 1 2 2 1   |                   p r o j e c t _ i d :   s t r   =   " " , 
 
 1 2 2 2   |           )   - >   " E x p o r t R e s u l t " : 
 
           |                       ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   F 8 2 1 
 
 1 2 2 3   |                   " " " W r i t e   a   s i g n e d   l o c a l   N D J S O N   e v i d e n c e   b u n d l e   w i t h o u t   c l o u d   c o n n e c t i v i t y . 
 
           | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ c e c . p y : 1 2 8 0 : 1 3 :   P E R F 2 0 3   ` t r y ` - ` e x c e p t `   w i t h i n   a   l o o p   i n c u r s   p e r f o r m a n c e   o v e r h e a d 
 
           | 
 
 1 2 7 8   |                                               } 
 
 1 2 7 9   |                                               l i n e s . a p p e n d ( j s o n . d u m p s ( e n t r y ,   d e f a u l t = s t r ) ) 
 
 1 2 8 0   |   /                           e x c e p t   E x c e p t i o n   a s   e x c :     #   p r a g m a :   n o   c o v e r 
 
 1 2 8 1   |   |                                   _ l o g . d e b u g ( " s f - c e c   e x p o r t _ l o c a l :   s k i p p e d   % s :   % s " ,   s c h e m a _ k e y ,   e x c ) 
 
           |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   P E R F 2 0 3 
 
 1 2 8 2   | 
 
 1 2 8 3   |                       r e c o r d _ c o u n t   =   l e n ( l i n e s ) 
 
           | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ d a t a s e t _ s c a n n e r . p y : 3 5 : 8 :   F 4 0 1   [ * ]   ` t i m e `   i m p o r t e d   b u t   u n u s e d 
 
       | 
 
 3 3   |   i m p o r t   p a t h l i b 
 
 3 4   |   i m p o r t   r e 
 
 3 5   |   i m p o r t   t i m e 
 
       |                 ^ ^ ^ ^   F 4 0 1 
 
 3 6   |   f r o m   d a t a c l a s s e s   i m p o r t   d a t a c l a s s ,   f i e l d 
 
 3 7   |   f r o m   d a t e t i m e   i m p o r t   d a t e t i m e ,   t i m e z o n e 
 
       | 
 
       =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` t i m e ` 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ d a t a s e t _ s c a n n e r . p y : 8 0 : 9 :   D 1 0 2   M i s s i n g   d o c s t r i n g   i n   p u b l i c   m e t h o d 
 
       | 
 
 7 8   |           d e t a i l :   s t r 
 
 7 9   | 
 
 8 0   |           d e f   t o _ d i c t ( s e l f )   - >   d i c t [ s t r ,   A n y ] : 
 
       |                   ^ ^ ^ ^ ^ ^ ^   D 1 0 2 
 
 8 1   |                   r e t u r n   { 
 
 8 2   |                           " c l a u s e _ i d " :   s e l f . c l a u s e _ i d , 
 
       | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ d a t a s e t _ s c a n n e r . p y : 1 2 6 : 1 0 1 :   E 5 0 1   L i n e   t o o   l o n g   ( 1 0 1   >   1 0 0 ) 
 
         | 
 
 1 2 4   |                           " p r o v e n a n c e _ c o v e r a g e _ p c t " :   r o u n d ( s e l f . p r o v e n a n c e _ c o v e r a g e _ p c t ,   2 ) , 
 
 1 2 5   |                           " b i a s _ s i g n a l " :   s e l f . b i a s _ s i g n a l , 
 
 1 2 6   |                           " e u _ a i _ a c t _ a r t i c l e _ 1 0 _ c l a u s e s " :   [ c . t o _ d i c t ( )   f o r   c   i n   s e l f . e u _ a i _ a c t _ a r t i c l e _ 1 0 _ c l a u s e s ] , 
 
         |                                                                                                                                                                                                           ^   E 5 0 1 
 
 1 2 7   |                   } 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ d a t a s e t _ s c a n n e r . p y : 1 3 7 : 9 :   F 8 4 1   L o c a l   v a r i a b l e   ` p a s s e d _ c l a u s e s `   i s   a s s i g n e d   t o   b u t   n e v e r   u s e d 
 
         | 
 
 1 3 5   |           d e f   t o _ m a r k d o w n ( s e l f )   - >   s t r : 
 
 1 3 6   |                   " " " R e t u r n   t h e   r e p o r t   a s   a   h u m a n - r e a d a b l e   M a r k d o w n   s t r i n g . " " " 
 
 1 3 7   |                   p a s s e d _ c l a u s e s   =   [ c   f o r   c   i n   s e l f . e u _ a i _ a c t _ a r t i c l e _ 1 0 _ c l a u s e s   i f   c . p a s s e d ] 
 
         |                   ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   F 8 4 1 
 
 1 3 8   |                   f a i l e d _ c l a u s e s   =   [ c   f o r   c   i n   s e l f . e u _ a i _ a c t _ a r t i c l e _ 1 0 _ c l a u s e s   i f   n o t   c . p a s s e d ] 
 
 1 3 9   |                   o v e r a l l   =   " P A S S "   i f   n o t   f a i l e d _ c l a u s e s   e l s e   " F A I L " 
 
         | 
 
         =   h e l p :   R e m o v e   a s s i g n m e n t   t o   u n u s e d   v a r i a b l e   ` p a s s e d _ c l a u s e s ` 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ d a t a s e t _ s c a n n e r . p y : 1 5 1 : 1 3 :   F 5 4 1   [ * ]   f - s t r i n g   w i t h o u t   a n y   p l a c e h o l d e r s 
 
         | 
 
 1 4 9   |                           " # #   D a t a s e t   S u m m a r y " , 
 
 1 5 0   |                           " " , 
 
 1 5 1   |                           f " |   M e t r i c   |   V a l u e   | " , 
 
         |                           ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   F 5 4 1 
 
 1 5 2   |                           f " | - - - - - - - - | - - - - - - - | " , 
 
 1 5 3   |                           f " |   F i l e s   s c a n n e d   |   { s e l f . f i l e _ c o u n t }   | " , 
 
         | 
 
         =   h e l p :   R e m o v e   e x t r a n e o u s   ` f `   p r e f i x 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ d a t a s e t _ s c a n n e r . p y : 1 5 2 : 1 3 :   F 5 4 1   [ * ]   f - s t r i n g   w i t h o u t   a n y   p l a c e h o l d e r s 
 
         | 
 
 1 5 0   |                           " " , 
 
 1 5 1   |                           f " |   M e t r i c   |   V a l u e   | " , 
 
 1 5 2   |                           f " | - - - - - - - - | - - - - - - - | " , 
 
         |                           ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   F 5 4 1 
 
 1 5 3   |                           f " |   F i l e s   s c a n n e d   |   { s e l f . f i l e _ c o u n t }   | " , 
 
 1 5 4   |                           f " |   R o w s   s c a n n e d   |   { s e l f . r o w _ c o u n t : , }   | " , 
 
         | 
 
         =   h e l p :   R e m o v e   e x t r a n e o u s   ` f `   p r e f i x 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ d a t a s e t _ s c a n n e r . p y : 1 7 6 : 1 3 :   F 5 4 1   [ * ]   f - s t r i n g   w i t h o u t   a n y   p l a c e h o l d e r s 
 
         | 
 
 1 7 4   |                           " # #   S i g n e d   E v i d e n c e " , 
 
 1 7 5   |                           " " , 
 
 1 7 6   |                           f " ` ` ` " , 
 
         |                           ^ ^ ^ ^ ^ ^   F 5 4 1 
 
 1 7 7   |                           f " H M A C - S H A 2 5 6 :   { s e l f . h m a c _ s i g n a t u r e } " , 
 
 1 7 8   |                           f " ` ` ` " , 
 
         | 
 
         =   h e l p :   R e m o v e   e x t r a n e o u s   ` f `   p r e f i x 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ d a t a s e t _ s c a n n e r . p y : 1 7 8 : 1 3 :   F 5 4 1   [ * ]   f - s t r i n g   w i t h o u t   a n y   p l a c e h o l d e r s 
 
         | 
 
 1 7 6   |                           f " ` ` ` " , 
 
 1 7 7   |                           f " H M A C - S H A 2 5 6 :   { s e l f . h m a c _ s i g n a t u r e } " , 
 
 1 7 8   |                           f " ` ` ` " , 
 
         |                           ^ ^ ^ ^ ^ ^   F 5 4 1 
 
 1 7 9   |                           " " , 
 
 1 8 0   |                   ] 
 
         | 
 
         =   h e l p :   R e m o v e   e x t r a n e o u s   ` f `   p r e f i x 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ d a t a s e t _ s c a n n e r . p y : 1 9 1 : 1 0 1 :   E 5 0 1   L i n e   t o o   l o n g   ( 1 0 2   >   1 0 0 ) 
 
         | 
 
 1 8 9   |   d e f   _ l o a d _ j s o n l ( p a t h :   p a t h l i b . P a t h )   - >   l i s t [ d i c t [ s t r ,   A n y ] ] : 
 
 1 9 0   |           r o w s :   l i s t [ d i c t [ s t r ,   A n y ] ]   =   [ ] 
 
 1 9 1   |           f o r   l i n e n o ,   l i n e   i n   e n u m e r a t e ( p a t h . r e a d _ t e x t ( e n c o d i n g = " u t f - 8 " ,   e r r o r s = " r e p l a c e " ) . s p l i t l i n e s ( ) ,   1 ) : 
 
         |                                                                                                                                                                                                           ^ ^   E 5 0 1 
 
 1 9 2   |                   l i n e   =   l i n e . s t r i p ( ) 
 
 1 9 3   |                   i f   n o t   l i n e : 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ d a t a s e t _ s c a n n e r . p y : 2 2 2 : 1 3 :   P E R F 4 0 1   U s e   ` l i s t . e x t e n d `   t o   c r e a t e   a   t r a n s f o r m e d   l i s t 
 
         | 
 
 2 2 0   |                   r e a d e r   =   c s v . D i c t R e a d e r ( i o . S t r i n g I O ( t e x t ) ) 
 
 2 2 1   |                   f o r   r o w   i n   r e a d e r : 
 
 2 2 2   |                           r o w s . a p p e n d ( d i c t ( r o w ) ) 
 
         |                           ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P E R F 4 0 1 
 
 2 2 3   |           e x c e p t   E x c e p t i o n :     #   n o q a :   B L E 0 0 1 
 
 2 2 4   |                   p a s s 
 
         | 
 
         =   h e l p :   R e p l a c e   f o r   l o o p   w i t h   l i s t . e x t e n d 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ d a t a s e t _ s c a n n e r . p y : 2 2 3 : 2 4 :   R U F 1 0 0   [ * ]   U n u s e d   ` n o q a `   d i r e c t i v e   ( n o n - e n a b l e d :   ` B L E 0 0 1 ` ) 
 
         | 
 
 2 2 1   |                   f o r   r o w   i n   r e a d e r : 
 
 2 2 2   |                           r o w s . a p p e n d ( d i c t ( r o w ) ) 
 
 2 2 3   |           e x c e p t   E x c e p t i o n :     #   n o q a :   B L E 0 0 1 
 
         |                                                 ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   R U F 1 0 0 
 
 2 2 4   |                   p a s s 
 
 2 2 5   |           r e t u r n   r o w s 
 
         | 
 
         =   h e l p :   R e m o v e   u n u s e d   ` n o q a `   d i r e c t i v e 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ d a t a s e t _ s c a n n e r . p y : 2 5 6 : 3 1 :   R U F 1 0 0   [ * ]   U n u s e d   ` n o q a `   d i r e c t i v e   ( n o n - e n a b l e d :   ` B L E 0 0 1 ` ) 
 
         | 
 
 2 5 4   |                           " d a t a s e t _ s c a n n e r :   p y a r r o w / p a n d a s   n o t   i n s t a l l e d       s k i p p i n g   % s " ,   p a t h . n a m e 
 
 2 5 5   |                   ) 
 
 2 5 6   |           e x c e p t   E x c e p t i o n   a s   e x c :     #   n o q a :   B L E 0 0 1 
 
         |                                                               ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   R U F 1 0 0 
 
 2 5 7   |                   _ l o g . w a r n i n g ( " d a t a s e t _ s c a n n e r :   c o u l d   n o t   r e a d   p a r q u e t   % s :   % s " ,   p a t h . n a m e ,   e x c ) 
 
 2 5 8   |           r e t u r n   [ ] 
 
         | 
 
         =   h e l p :   R e m o v e   u n u s e d   ` n o q a `   d i r e c t i v e 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ d a t a s e t _ s c a n n e r . p y : 2 8 3 : 1 3 :   P E R F 4 0 1   U s e   a   l i s t   c o m p r e h e n s i o n   t o   c r e a t e   a   t r a n s f o r m e d   l i s t 
 
         | 
 
 2 8 1   |           f o r   p   i n   s o r t e d ( r o o t . r g l o b ( " * " ) ) : 
 
 2 8 2   |                   i f   p . i s _ f i l e ( )   a n d   p . s u f f i x . l o w e r ( )   i n   _ S U P P O R T E D _ E X T E N S I O N S : 
 
 2 8 3   |                           f i l e s . a p p e n d ( p ) 
 
         |                           ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P E R F 4 0 1 
 
 2 8 4   |           r e t u r n   f i l e s 
 
         | 
 
         =   h e l p :   R e p l a c e   f o r   l o o p   w i t h   l i s t   c o m p r e h e n s i o n 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ d a t a s e t _ s c a n n e r . p y : 3 2 7 : 7 1 :   R U F 0 0 2   D o c s t r i n g   c o n t a i n s   a m b i g u o u s   `   `   ( E N   D A S H ) .   D i d   y o u   m e a n   ` - `   ( H Y P H E N - M I N U S ) ? 
 
         | 
 
 3 2 6   |   d e f   _ c h e c k _ c o n s e n t _ c o v e r a g e ( r o w s :   l i s t [ d i c t [ s t r ,   A n y ] ] )   - >   f l o a t : 
 
 3 2 7   |           " " " R e t u r n   f r a c t i o n   o f   r o w s   t h a t   h a v e   a t   l e a s t   o n e   c o n s e n t   f i e l d   ( 0   1 0 0 ) . 
 
         |                                                                                                                                               ^   R U F 0 0 2 
 
 3 2 8   | 
 
 3 2 9   |           R e t u r n s   1 0 0 . 0   f o r   e m p t y   d a t a s e t s   ( v a c u o u s l y   t r u e       n o   r o w s   v i o l a t e   t h e   r u l e ) . 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ d a t a s e t _ s c a n n e r . p y : 3 4 0 : 8 1 :   R U F 0 0 2   D o c s t r i n g   c o n t a i n s   a m b i g u o u s   `   `   ( E N   D A S H ) .   D i d   y o u   m e a n   ` - `   ( H Y P H E N - M I N U S ) ? 
 
         | 
 
 3 3 9   |   d e f   _ c h e c k _ p r o v e n a n c e _ c o v e r a g e ( r o w s :   l i s t [ d i c t [ s t r ,   A n y ] ] )   - >   f l o a t : 
 
 3 4 0   |           " " " R e t u r n   f r a c t i o n   o f   r o w s   t h a t   h a v e   a t   l e a s t   o n e   s o u r c e / p r o v e n a n c e   f i e l d   ( 0   1 0 0 ) . 
 
         |                                                                                                                                                                   ^   R U F 0 0 2 
 
 3 4 1   | 
 
 3 4 2   |           R e t u r n s   1 0 0 . 0   f o r   e m p t y   d a t a s e t s   ( v a c u o u s l y   t r u e       n o   r o w s   v i o l a t e   t h e   r u l e ) . 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ d a t a s e t _ s c a n n e r . p y : 3 5 6 : 5 0 :   R U F 0 0 2   D o c s t r i n g   c o n t a i n s   a m b i g u o u s   `   `   ( E N   D A S H ) .   D i d   y o u   m e a n   ` - `   ( H Y P H E N - M I N U S ) ? 
 
         | 
 
 3 5 5   |           U s e s   a   Z i p f - s k e w   h e u r i s t i c :   t h e   t o p - 1   t o k e n   r e p r e s e n t i n g   m o r e   t h a n 
 
 3 5 6   |           4 0 %   o f   t o t a l   t o k e n s   i n d i c a t e s   * h i g h *   s k e w ;   2 0   4 0 %   i s   * m e d i u m * . 
 
         |                                                                                                     ^   R U F 0 0 2 
 
 3 5 7   | 
 
 3 5 8   |           R e q u i r e s   a t   l e a s t   3 0   t o t a l   t o k e n s   t o   p r o d u c e   a   m e a n i n g f u l   s i g n a l ; 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ d a t a s e t _ s c a n n e r . p y : 3 7 3 : 3 3 :   P L R 2 0 0 4   M a g i c   v a l u e   u s e d   i n   c o m p a r i s o n ,   c o n s i d e r   r e p l a c i n g   ` 3 `   w i t h   a   c o n s t a n t   v a r i a b l e 
 
         | 
 
 3 7 1   |                                   c o n t i n u e 
 
 3 7 2   |                           f o r   w o r d   i n   r e . s p l i t ( r " [ ^ a - z 0 - 9 ] + " ,   v a l . l o w e r ( ) ) : 
 
 3 7 3   |                                   i f   l e n ( w o r d )   > =   3 : 
 
         |                                                                   ^   P L R 2 0 0 4 
 
 3 7 4   |                                           t o k e n _ f r e q [ w o r d ]   =   t o k e n _ f r e q . g e t ( w o r d ,   0 )   +   1 
 
 3 7 5   |                                           t o t a l   + =   1 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ d a t a s e t _ s c a n n e r . p y : 3 7 8 : 1 6 :   P L R 2 0 0 4   M a g i c   v a l u e   u s e d   i n   c o m p a r i s o n ,   c o n s i d e r   r e p l a c i n g   ` 3 0 `   w i t h   a   c o n s t a n t   v a r i a b l e 
 
         | 
 
 3 7 7   |           #   N o t   e n o u g h   d a t a   f o r   a   m e a n i n g f u l   s k e w   s i g n a l 
 
 3 7 8   |           i f   t o t a l   <   3 0 : 
 
         |                                 ^ ^   P L R 2 0 0 4 
 
 3 7 9   |                   r e t u r n   " l o w " 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ d a t a s e t _ s c a n n e r . p y : 3 8 4 : 2 0 :   P L R 2 0 0 4   M a g i c   v a l u e   u s e d   i n   c o m p a r i s o n ,   c o n s i d e r   r e p l a c i n g   ` 0 . 4 0 `   w i t h   a   c o n s t a n t   v a r i a b l e 
 
         | 
 
 3 8 2   |           t o p _ r a t i o   =   t o p _ f r e q   /   t o t a l 
 
 3 8 3   | 
 
 3 8 4   |           i f   t o p _ r a t i o   >   0 . 4 0 : 
 
         |                                         ^ ^ ^ ^   P L R 2 0 0 4 
 
 3 8 5   |                   r e t u r n   " h i g h " 
 
 3 8 6   |           i f   t o p _ r a t i o   >   0 . 2 0 : 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ d a t a s e t _ s c a n n e r . p y : 3 8 6 : 2 0 :   P L R 2 0 0 4   M a g i c   v a l u e   u s e d   i n   c o m p a r i s o n ,   c o n s i d e r   r e p l a c i n g   ` 0 . 2 0 `   w i t h   a   c o n s t a n t   v a r i a b l e 
 
         | 
 
 3 8 4   |           i f   t o p _ r a t i o   >   0 . 4 0 : 
 
 3 8 5   |                   r e t u r n   " h i g h " 
 
 3 8 6   |           i f   t o p _ r a t i o   >   0 . 2 0 : 
 
         |                                         ^ ^ ^ ^   P L R 2 0 0 4 
 
 3 8 7   |                   r e t u r n   " m e d i u m " 
 
 3 8 8   |           r e t u r n   " l o w " 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ d a t a s e t _ s c a n n e r . p y : 4 1 3 : 3 3 :   P L R 2 0 0 4   M a g i c   v a l u e   u s e d   i n   c o m p a r i s o n ,   c o n s i d e r   r e p l a c i n g   ` 8 0 . 0 `   w i t h   a   c o n s t a n t   v a r i a b l e 
 
         | 
 
 4 1 2   |           #   A r t .   1 0 ( 2 ) ( b )       C o n s e n t   d o c u m e n t a t i o n 
 
 4 1 3   |           c o n s e n t _ o k   =   c o n s e n t _ p c t   > =   8 0 . 0 
 
         |                                                                   ^ ^ ^ ^   P L R 2 0 0 4 
 
 4 1 4   |           c l a u s e s . a p p e n d ( A r t i c l e 1 0 C l a u s e ( 
 
 4 1 5   |                   c l a u s e _ i d = " A r t . 1 0 ( 2 ) ( b ) " , 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ d a t a s e t _ s c a n n e r . p y : 4 2 5 : 3 9 :   P L R 2 0 0 4   M a g i c   v a l u e   u s e d   i n   c o m p a r i s o n ,   c o n s i d e r   r e p l a c i n g   ` 8 0 . 0 `   w i t h   a   c o n s t a n t   v a r i a b l e 
 
         | 
 
 4 2 4   |           #   A r t .   1 0 ( 2 ) ( c )       D a t a   p r o v e n a n c e   /   s o u r c e   t r a c e a b i l i t y 
 
 4 2 5   |           p r o v e n a n c e _ o k   =   p r o v e n a n c e _ p c t   > =   8 0 . 0 
 
         |                                                                               ^ ^ ^ ^   P L R 2 0 0 4 
 
 4 2 6   |           c l a u s e s . a p p e n d ( A r t i c l e 1 0 C l a u s e ( 
 
 4 2 7   |                   c l a u s e _ i d = " A r t . 1 0 ( 2 ) ( c ) " , 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ d a t a s e t _ s c a n n e r . p y : 4 6 7 : 2 5 :   U P 0 3 7   [ * ]   R e m o v e   q u o t e s   f r o m   t y p e   a n n o t a t i o n 
 
         | 
 
 4 6 5   |   #   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 4 6 6   | 
 
 4 6 7   |   d e f   _ r e n d e r _ p d f ( r e p o r t :   " D a t a s e t C o m p l i a n c e R e p o r t " ,   o u t _ p a t h :   p a t h l i b . P a t h )   - >   N o n e :     #   p r a g m a :   n o   c o v e r 
 
         |                                                   ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   U P 0 3 7 
 
 4 6 8   |           " " " R e n d e r   * r e p o r t *   a s   a   P D F   a t   * o u t _ p a t h * . 
 
         | 
 
         =   h e l p :   R e m o v e   q u o t e s 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ d a t a s e t _ s c a n n e r . p y : 4 6 7 : 1 0 1 :   E 5 0 1   L i n e   t o o   l o n g   ( 1 0 3   >   1 0 0 ) 
 
         | 
 
 4 6 5   |   #   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 4 6 6   | 
 
 4 6 7   |   d e f   _ r e n d e r _ p d f ( r e p o r t :   " D a t a s e t C o m p l i a n c e R e p o r t " ,   o u t _ p a t h :   p a t h l i b . P a t h )   - >   N o n e :     #   p r a g m a :   n o   c o v e r 
 
         |                                                                                                                                                                                                           ^ ^ ^   E 5 0 1 
 
 4 6 8   |           " " " R e n d e r   * r e p o r t *   a s   a   P D F   a t   * o u t _ p a t h * . 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ d a t a s e t _ s c a n n e r . p y : 5 3 4 : 9 :   P E R F 4 0 1   U s e   ` l i s t . e x t e n d `   t o   c r e a t e   a   t r a n s f o r m e d   l i s t 
 
         | 
 
 5 3 2   |               c l a u s e _ d a t a :   l i s t [ l i s t [ s t r ] ]   =   [ [ " C l a u s e   I D " ,   " T i t l e " ,   " S t a t u s " ,   " D e t a i l " ] ] 
 
 5 3 3   |               f o r   c l a u s e   i n   r e p o r t . e u _ a i _ a c t _ a r t i c l e _ 1 0 _ c l a u s e s : 
 
 5 3 4   |   /                   c l a u s e _ d a t a . a p p e n d ( [ 
 
 5 3 5   |   |                           c l a u s e . c l a u s e _ i d , 
 
 5 3 6   |   |                           c l a u s e . t i t l e , 
 
 5 3 7   |   |                           " P A S S "   i f   c l a u s e . p a s s e d   e l s e   " F A I L " , 
 
 5 3 8   |   |                           c l a u s e . d e t a i l , 
 
 5 3 9   |   |                   ] ) 
 
         |   | _ _ _ _ _ _ _ _ _ _ ^   P E R F 4 0 1 
 
 5 4 0   |               c l a u s e _ t a b l e   =   T a b l e ( c l a u s e _ d a t a ,   c o l W i d t h s = [ 2 . 5   *   c m ,   5   *   c m ,   1 . 8   *   c m ,   9 . 2   *   c m ] ) 
 
 5 4 1   |               c l a u s e _ t a b l e . s e t S t y l e ( T a b l e S t y l e ( [ 
 
         | 
 
         =   h e l p :   R e p l a c e   f o r   l o o p   w i t h   l i s t . e x t e n d 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ e x p l a i n . p y : 1 3 1 : 9 :   D 1 0 2   M i s s i n g   d o c s t r i n g   i n   p u b l i c   m e t h o d 
 
         | 
 
 1 2 9   |           n o t e s :   s t r   =   " " 
 
 1 3 0   | 
 
 1 3 1   |           d e f   t o _ d i c t ( s e l f )   - >   d i c t [ s t r ,   A n y ] : 
 
         |                   ^ ^ ^ ^ ^ ^ ^   D 1 0 2 
 
 1 3 2   |                   r e t u r n   { 
 
 1 3 3   |                           " a r t i c l e " :   s e l f . a r t i c l e , 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ e x p l a i n . p y : 1 4 8 : 5 :   D 2 0 5   1   b l a n k   l i n e   r e q u i r e d   b e t w e e n   s u m m a r y   l i n e   a n d   d e s c r i p t i o n 
 
         | 
 
 1 4 6   |       @ d a t a c l a s s 
 
 1 4 7   |       c l a s s   E x p l a i n R e c o r d : 
 
 1 4 8   |   /           " " " H i g h - l e v e l ,   r o a d m a p - c o n t r a c t   e x p l a n a t i o n   r e c o r d   r e t u r n e d   b y 
 
 1 4 9   |   |           : m e t h : ` S F E x p l a i n C l i e n t . e x p l a i n ` . 
 
 1 5 0   |   | 
 
 1 5 1   |   |           T h i s   i s   t h e   p r i m a r y   c o n s u m e r - f a c i n g   t y p e   f o r   C A R D   1 B - 1 .     I t   e x t e n d s   t h e 
 
 1 5 2   |   |           l o w - l e v e l   : c l a s s : ` ~ s p a n f o r g e . n a m e s p a c e s . r u n t i m e _ g o v e r n a n c e . E x p l a n a t i o n P a y l o a d ` 
 
 1 5 3   |   |           w i t h   t h e   f i e l d s   r e q u i r e d   b y   t h e   r o a d m a p   c o n t r a c t   a n d   E U   A I   A c t   m a p p i n g s . 
 
 1 5 4   |   | 
 
 1 5 5   |   |           F i e l d s 
 
 1 5 6   |   |           - - - - - - 
 
 1 5 7   |   |           d e c i s i o n _ d r i v e r s : 
 
 1 5 8   |   |                   E x t r a c t e d   c o n t r i b u t i n g   f a c t o r s   ( A r t .   1 3       t r a n s p a r e n c y ) . 
 
 1 5 9   |   |           c o n f i d e n c e _ s c o r e : 
 
 1 6 0   |   |                   N o r m a l i s e d   f l o a t   i n   [ 0 ,   1 ]   r e p r e s e n t i n g   m o d e l   c e r t a i n t y   ( A r t .   1 4 ) . 
 
 1 6 1   |   |           m o d e l _ v e r s i o n : 
 
 1 6 2   |   |                   O p t i o n a l   m o d e l   i d e n t i f i e r   /   v e r s i o n   s t r i n g . 
 
 1 6 3   |   |           h m a c _ s i g n a t u r e : 
 
 1 6 4   |   |                   H M A C - S H A 2 5 6   s i g n a t u r e   r e t u r n e d   b y   ` ` s f _ a u d i t . a p p e n d ( ) ` ` . 
 
 1 6 5   |   |           e u _ a i _ a c t _ c l a u s e s : 
 
 1 6 6   |   |                   A r t i c l e   1 3   a n d   A r t i c l e   1 4   c l a u s e   m a p p i n g s   w i t h   p a s s / f a i l   s t a t u s . 
 
 1 6 7   |   |           h u m a n _ o v e r s i g h t _ r e q u i r e d : 
 
 1 6 8   |   |                   ` ` T r u e ` `   w h e n   * c o n f i d e n c e _ s c o r e *   i s   b e l o w   t h e   o v e r s i g h t   t h r e s h o l d 
 
 1 6 9   |   |                   ( A r t i c l e   1 4   f l a g ) . 
 
 1 7 0   |   |           m o d e l _ o u t p u t _ t y p e : 
 
 1 7 1   |   |                   O n e   o f   t h e   f i v e   c a n o n i c a l   o u t p u t   c a t e g o r i e s 
 
 1 7 2   |   |                   ( ` ` c l a s s i f i c a t i o n ` ` ,   ` ` g e n e r a t i o n ` ` ,   ` ` s t r u c t u r e d ` ` , 
 
 1 7 3   |   |                   ` ` r e j e c t i o n ` ` ,   ` ` t o o l _ c a l l ` ` ) . 
 
 1 7 4   |   |           " " " 
 
         |   | _ _ _ _ _ _ _ ^   D 2 0 5 
 
 1 7 5   | 
 
 1 7 6   |               e x p l a n a t i o n _ i d :   s t r 
 
         | 
 
         =   h e l p :   I n s e r t   s i n g l e   b l a n k   l i n e 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ e x p l a i n . p y : 1 9 5 : 9 :   D 1 0 2   M i s s i n g   d o c s t r i n g   i n   p u b l i c   m e t h o d 
 
         | 
 
 1 9 3   |                   s e l f . h u m a n _ o v e r s i g h t _ r e q u i r e d   =   s e l f . c o n f i d e n c e _ s c o r e   <   _ D E F A U L T _ O V E R S I G H T _ T H R E S H O L D 
 
 1 9 4   | 
 
 1 9 5   |           d e f   t o _ d i c t ( s e l f )   - >   d i c t [ s t r ,   A n y ] : 
 
         |                   ^ ^ ^ ^ ^ ^ ^   D 1 0 2 
 
 1 9 6   |                   r e t u r n   { 
 
 1 9 7   |                           " e x p l a n a t i o n _ i d " :   s e l f . e x p l a n a t i o n _ i d , 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ e x p l a i n . p y : 2 6 1 : 9 :   D 4 1 7   M i s s i n g   a r g u m e n t   d e s c r i p t i o n s   i n   t h e   d o c s t r i n g   f o r   ` g e n e r a t e ` :   ` a g e n t _ i d ` ,   ` c o n f i d e n c e ` ,   ` d e c i s i o n _ i d ` ,   ` e x p l a n a t i o n _ i d ` ,   ` f a c t o r s ` ,   ` g e n e r a t e d _ a t ` ,   ` m e t a d a t a ` ,   ` m o d e l _ i d ` ,   ` p o l i c y _ a c t i o n ` ,   ` p o l i c y _ i d ` ,   ` s u m m a r y ` ,   ` t r a c e _ i d ` 
 
         | 
 
 2 5 9   |                   s e l f . _ e m i t _ t i m e o u t _ s e c   =   e m i t _ t i m e o u t _ s e c 
 
 2 6 0   | 
 
 2 6 1   |           d e f   g e n e r a t e ( 
 
         |                   ^ ^ ^ ^ ^ ^ ^ ^   D 4 1 7 
 
 2 6 2   |                   s e l f , 
 
 2 6 3   |                   * , 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ e x p l a i n . p y : 4 5 1 : 1 0 1 :   E 5 0 1   L i n e   t o o   l o n g   ( 1 0 1   >   1 0 0 ) 
 
         | 
 
 4 4 9   |                   a g e n t _ i d :   s t r   =   c o n t e x t . g e t ( " a g e n t _ i d " ,   " " )   o r   " u n k n o w n " 
 
 4 5 0   |                   d e c i s i o n _ i d :   s t r   =   c o n t e x t . g e t ( " d e c i s i o n _ i d " ,   " " )   o r   _ u l i d ( ) 
 
 4 5 1   |                   g e n e r a t e d _ a t :   s t r   =   c o n t e x t . g e t ( " g e n e r a t e d _ a t " ,   " " )   o r   d a t e t i m e . n o w ( t i m e z o n e . u t c ) . i s o f o r m a t ( ) 
 
         |                                                                                                                                                                                                           ^   E 5 0 1 
 
 4 5 2   |                   p o l i c y _ a c t i o n :   s t r   =   c o n t e x t . g e t ( " p o l i c y _ a c t i o n " ,   " a l l o w " ) 
 
 4 5 3   |                   m o d e l _ v e r s i o n :   s t r   |   N o n e   =   c o n t e x t . g e t ( " m o d e l _ v e r s i o n " ) 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ e x p l a i n . p y : 4 9 4 : 1 0 1 :   E 5 0 1   L i n e   t o o   l o n g   ( 1 1 7   >   1 0 0 ) 
 
         | 
 
 4 9 2   |                           e x p l a n a t i o n _ i d = e x p l a n a t i o n _ i d , 
 
 4 9 3   |                           m o d e l _ i d = m o d e l _ v e r s i o n , 
 
 4 9 4   |                           m o d e l _ t y p e = E x p l a i n M o d e l T y p e ( o u t p u t _ t y p e )   i f   o u t p u t _ t y p e   i n   { e . v a l u e   f o r   e   i n   E x p l a i n M o d e l T y p e }   e l s e   N o n e , 
 
         |                                                                                                                                                                                                           ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   E 5 0 1 
 
 4 9 5   |                           c o n f i d e n c e = c o n f i d e n c e _ s c o r e   i f   c o n f i d e n c e _ s c o r e   >   0 . 0   e l s e   N o n e , 
 
 4 9 6   |                           m e t a d a t a = { " m o d e l _ o u t p u t _ t y p e " :   o u t p u t _ t y p e ,   " e u _ a i _ a c t " :   T r u e } , 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ e x p l a i n . p y : 5 2 9 : 9 :   P L R 0 9 1 1   T o o   m a n y   r e t u r n   s t a t e m e n t s   ( 7   >   6 ) 
 
         | 
 
 5 2 8   |           @ s t a t i c m e t h o d 
 
 5 2 9   |           d e f   _ i n f e r _ o u t p u t _ t y p e ( r e s p o n s e :   s t r   |   d i c t [ s t r ,   A n y ] ,   h i n t :   s t r )   - >   s t r : 
 
         |                   ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 9 1 1 
 
 5 3 0   |                   " " " I n f e r   m o d e l   o u t p u t   t y p e   f r o m   * h i n t *   o r   * r e s p o n s e *   s h a p e . " " " 
 
 5 3 1   |                   v a l i d   =   { e . v a l u e   f o r   e   i n   M o d e l O u t p u t T y p e } 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ e x p l a i n . p y : 5 4 8 : 2 6 :   P L R 2 0 0 4   M a g i c   v a l u e   u s e d   i n   c o m p a r i s o n ,   c o n s i d e r   r e p l a c i n g   ` 6 0 `   w i t h   a   c o n s t a n t   v a r i a b l e 
 
         | 
 
 5 4 6   |                                   r e t u r n   M o d e l O u t p u t T y p e . R E J E C T I O N . v a l u e 
 
 5 4 7   |                           #   C l a s s i f i c a t i o n   o u t p u t s   a r e   s h o r t   l a b e l   s t r i n g s 
 
 5 4 8   |                           i f   l e n ( l o )   <   6 0   a n d   " \ n "   n o t   i n   l o : 
 
         |                                                     ^ ^   P L R 2 0 0 4 
 
 5 4 9   |                                   r e t u r n   M o d e l O u t p u t T y p e . C L A S S I F I C A T I O N . v a l u e 
 
 5 5 0   |                   r e t u r n   M o d e l O u t p u t T y p e . G E N E R A T I O N . v a l u e 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ e x p l a i n . p y : 5 8 4 : 1 0 1 :   E 5 0 1   L i n e   t o o   l o n g   ( 1 1 4   >   1 0 0 ) 
 
         | 
 
 5 8 2   |                                   t o o l _ n a m e   =   ( 
 
 5 8 3   |                                           r e s p o n s e . g e t ( " f u n c t i o n _ c a l l " ,   { } ) . g e t ( " n a m e " ,   " " ) 
 
 5 8 4   |                                           o r   ( t o o l _ c a l l s [ 0 ] . g e t ( " f u n c t i o n " ,   { } ) . g e t ( " n a m e " ,   " t o o l _ c a l l " )   i f   t o o l _ c a l l s   e l s e   " t o o l _ c a l l " ) 
 
         |                                                                                                                                                                                                           ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   E 5 0 1 
 
 5 8 5   |                                   ) 
 
 5 8 6   |                           e l s e : 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ e x p l a i n . p y : 5 9 6 : 4 9 :   P L R 2 0 0 4   M a g i c   v a l u e   u s e d   i n   c o m p a r i s o n ,   c o n s i d e r   r e p l a c i n g   ` 1 2 0 `   w i t h   a   c o n s t a n t   v a r i a b l e 
 
         | 
 
 5 9 4   |                   e l s e :     #   g e n e r a t i o n 
 
 5 9 5   |                           t e x t   =   r e s p o n s e   i f   i s i n s t a n c e ( r e s p o n s e ,   s t r )   e l s e   s t r ( r e s p o n s e ) 
 
 5 9 6   |                           s n i p p e t   =   t e x t [ : 1 2 0 ]   i f   l e n ( t e x t )   >   1 2 0   e l s e   t e x t 
 
         |                                                                                                   ^ ^ ^   P L R 2 0 0 4 
 
 5 9 7   |                           d r i v e r s   =   [ { " n a m e " :   " g e n e r a t e d _ t e x t " ,   " v a l u e " :   s n i p p e t ,   " w e i g h t " :   1 . 0 , 
 
 5 9 8   |                                                   " c o n t r i b u t i o n " :   1 . 0 ,   " e v i d e n c e " :   " m o d e l   g e n e r a t i o n " } ] 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ e x p l a i n . p y : 6 3 2 : 1 7 :   T R Y 3 0 0   C o n s i d e r   m o v i n g   t h i s   s t a t e m e n t   t o   a n   ` e l s e `   b l o c k 
 
         | 
 
 6 3 0   |                           t r y : 
 
 6 3 1   |                                   r e s u l t   =   s f _ a u d i t . a p p e n d ( r e c o r d _ p a y l o a d ,   " s p a n f o r g e . e x p l a n a t i o n . v 1 " ) 
 
 6 3 2   |                                   r e t u r n   r e s u l t . h m a c _ s i g n a t u r e ,   r e s u l t . r e c o r d _ i d 
 
         |                                   ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   T R Y 3 0 0 
 
 6 3 3   |                           e x c e p t   E x c e p t i o n   a s   e x c :     #   n o q a :   B L E 0 0 1 
 
 6 3 4   |                                   l a s t _ e x c   =   e x c 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ e x p l a i n . p y : 6 3 3 : 3 9 :   R U F 1 0 0   [ * ]   U n u s e d   ` n o q a `   d i r e c t i v e   ( n o n - e n a b l e d :   ` B L E 0 0 1 ` ) 
 
         | 
 
 6 3 1   |                                   r e s u l t   =   s f _ a u d i t . a p p e n d ( r e c o r d _ p a y l o a d ,   " s p a n f o r g e . e x p l a n a t i o n . v 1 " ) 
 
 6 3 2   |                                   r e t u r n   r e s u l t . h m a c _ s i g n a t u r e ,   r e s u l t . r e c o r d _ i d 
 
 6 3 3   |                           e x c e p t   E x c e p t i o n   a s   e x c :     #   n o q a :   B L E 0 0 1 
 
         |                                                                               ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   R U F 1 0 0 
 
 6 3 4   |                                   l a s t _ e x c   =   e x c 
 
 6 3 5   |                                   r e m a i n i n g   =   d e a d l i n e   -   t i m e . m o n o t o n i c ( ) 
 
         | 
 
         =   h e l p :   R e m o v e   u n u s e d   ` n o q a `   d i r e c t i v e 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ e x p l a i n . p y : 6 6 5 : 1 7 :   T R Y 3 0 0   C o n s i d e r   m o v i n g   t h i s   s t a t e m e n t   t o   a n   ` e l s e `   b l o c k 
 
         | 
 
 6 6 3   |                           t r y : 
 
 6 6 4   |                                   s f _ a u d i t . a p p e n d ( p a y l o a d . t o _ d i c t ( ) ,   " s p a n f o r g e . e x p l a n a t i o n . v 1 " ) 
 
 6 6 5   |                                   r e t u r n 
 
         |                                   ^ ^ ^ ^ ^ ^   T R Y 3 0 0 
 
 6 6 6   |                           e x c e p t   E x c e p t i o n   a s   e x c :     #   n o q a :   B L E 0 0 1 
 
 6 6 7   |                                   l a s t _ e x c   =   e x c 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ e x p l a i n . p y : 6 6 6 : 3 9 :   R U F 1 0 0   [ * ]   U n u s e d   ` n o q a `   d i r e c t i v e   ( n o n - e n a b l e d :   ` B L E 0 0 1 ` ) 
 
         | 
 
 6 6 4   |                                   s f _ a u d i t . a p p e n d ( p a y l o a d . t o _ d i c t ( ) ,   " s p a n f o r g e . e x p l a n a t i o n . v 1 " ) 
 
 6 6 5   |                                   r e t u r n 
 
 6 6 6   |                           e x c e p t   E x c e p t i o n   a s   e x c :     #   n o q a :   B L E 0 0 1 
 
         |                                                                               ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   R U F 1 0 0 
 
 6 6 7   |                                   l a s t _ e x c   =   e x c 
 
 6 6 8   |                                   r e m a i n i n g   =   d e a d l i n e   -   t i m e . m o n o t o n i c ( ) 
 
         | 
 
         =   h e l p :   R e m o v e   u n u s e d   ` n o q a `   d i r e c t i v e 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ o b s e r v e . p y : 6 3 8 : 9 :   P L R 0 9 1 2   T o o   m a n y   b r a n c h e s   ( 1 7   >   1 2 ) 
 
         | 
 
 6 3 6   |                   ) 
 
 6 3 7   | 
 
 6 3 8   |           d e f   _ d o _ e x p o r t ( 
 
         |                   ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 9 1 2 
 
 6 3 9   |                   s e l f , 
 
 6 4 0   |                   s p a n s :   l i s t [ d i c t [ s t r ,   A n y ] ] , 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ o b s e r v e . p y : 6 3 8 : 9 :   P L R 0 9 1 5   T o o   m a n y   s t a t e m e n t s   ( 6 9   >   5 0 ) 
 
         | 
 
 6 3 6   |                   ) 
 
 6 3 7   | 
 
 6 3 8   |           d e f   _ d o _ e x p o r t ( 
 
         |                   ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 9 1 5 
 
 6 3 9   |                   s e l f , 
 
 6 4 0   |                   s p a n s :   l i s t [ d i c t [ s t r ,   A n y ] ] , 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ r b a c . p y : 3 4 : 1 1 :   R U F 0 2 2   [ * ]   ` _ _ a l l _ _ `   i s   n o t   s o r t e d 
 
       | 
 
 3 2   |       f r o m   s p a n f o r g e . s d k . _ b a s e   i m p o r t   S F C l i e n t C o n f i g ,   S F S e r v i c e C l i e n t 
 
 3 3   | 
 
 3 4   |       _ _ a l l _ _   =   [ 
 
       |     _ _ _ _ _ _ _ _ _ _ _ ^ 
 
 3 5   |   |           " R B A C M a n i f e s t " , 
 
 3 6   |   |           " R B A C S t a t u s I n f o " , 
 
 3 7   |   |           " S T A N D A R D _ R O L E _ M A T R I X " , 
 
 3 8   |   |           " S F R B A C C l i e n t " , 
 
 3 9   |   |   ] 
 
       |   | _ ^   R U F 0 2 2 
 
 4 0   | 
 
 4 1   |       _ r b a c _ l o g   =   l o g g i n g . g e t L o g g e r ( _ _ n a m e _ _ ) 
 
       | 
 
       =   h e l p :   A p p l y   a n   i s o r t - s t y l e   s o r t i n g   t o   ` _ _ a l l _ _ ` 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ r b a c . p y : 1 9 6 : 1 3 :   T R Y 0 0 4   P r e f e r   ` T y p e E r r o r `   e x c e p t i o n   f o r   i n v a l i d   t y p e 
 
         | 
 
 1 9 4   |                   d a t a   =   _ p a r s e _ y a m l _ s a f e ( y a m l _ s t r ) 
 
 1 9 5   |                   i f   n o t   i s i n s t a n c e ( d a t a ,   d i c t ) : 
 
 1 9 6   |                           r a i s e   V a l u e E r r o r ( " r e g i s t e r _ a c t o r _ f r o m _ y a m l :   Y A M L   r o o t   m u s t   b e   a   m a p p i n g " ) 
 
         |                           ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   T R Y 0 0 4 
 
 1 9 7   |                   a c t o r _ i d   =   d a t a . g e t ( " a c t o r _ i d " ) 
 
 1 9 8   |                   i f   n o t   a c t o r _ i d   o r   n o t   i s i n s t a n c e ( a c t o r _ i d ,   s t r ) : 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ r b a c . p y : 2 0 2 : 1 3 :   T R Y 0 0 4   P r e f e r   ` T y p e E r r o r `   e x c e p t i o n   f o r   i n v a l i d   t y p e 
 
         | 
 
 2 0 0   |                   r o l e s   =   d a t a . g e t ( " r o l e s " )   o r   [ ] 
 
 2 0 1   |                   i f   n o t   i s i n s t a n c e ( r o l e s ,   l i s t ) : 
 
 2 0 2   |                           r a i s e   V a l u e E r r o r ( " r e g i s t e r _ a c t o r _ f r o m _ y a m l :   ' r o l e s '   m u s t   b e   a   l i s t " ) 
 
         |                           ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   T R Y 0 0 4 
 
 2 0 3   |                   r e s o u r c e _ r o l e s   =   d a t a . g e t ( " r e s o u r c e _ r o l e s " )   o r   { } 
 
 2 0 4   |                   i f   n o t   i s i n s t a n c e ( r e s o u r c e _ r o l e s ,   d i c t ) : 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ r b a c . p y : 2 0 5 : 1 3 :   T R Y 0 0 4   P r e f e r   ` T y p e E r r o r `   e x c e p t i o n   f o r   i n v a l i d   t y p e 
 
         | 
 
 2 0 3   |                   r e s o u r c e _ r o l e s   =   d a t a . g e t ( " r e s o u r c e _ r o l e s " )   o r   { } 
 
 2 0 4   |                   i f   n o t   i s i n s t a n c e ( r e s o u r c e _ r o l e s ,   d i c t ) : 
 
 2 0 5   |                           r a i s e   V a l u e E r r o r ( " r e g i s t e r _ a c t o r _ f r o m _ y a m l :   ' r e s o u r c e _ r o l e s '   m u s t   b e   a   m a p p i n g " ) 
 
         |                           ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   T R Y 0 0 4 
 
 2 0 6   |                   m e t a d a t a   =   d a t a . g e t ( " m e t a d a t a " )   o r   { } 
 
 2 0 7   |                   i f   n o t   i s i n s t a n c e ( m e t a d a t a ,   d i c t ) : 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ r b a c . p y : 2 0 8 : 1 3 :   T R Y 0 0 4   P r e f e r   ` T y p e E r r o r `   e x c e p t i o n   f o r   i n v a l i d   t y p e 
 
         | 
 
 2 0 6   |                   m e t a d a t a   =   d a t a . g e t ( " m e t a d a t a " )   o r   { } 
 
 2 0 7   |                   i f   n o t   i s i n s t a n c e ( m e t a d a t a ,   d i c t ) : 
 
 2 0 8   |                           r a i s e   V a l u e E r r o r ( " r e g i s t e r _ a c t o r _ f r o m _ y a m l :   ' m e t a d a t a '   m u s t   b e   a   m a p p i n g " ) 
 
         |                           ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   T R Y 0 0 4 
 
 2 0 9   |                   r e t u r n   s e l f . r e g i s t e r _ a c t o r ( 
 
 2 1 0   |                           a c t o r _ i d = a c t o r _ i d , 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ r b a c . p y : 2 2 0 : 3 2 :   R U F 1 0 0   [ * ]   U n u s e d   ` n o q a `   d i r e c t i v e   ( n o n - e n a b l e d :   ` A R G 0 0 2 ` ) 
 
         | 
 
 2 1 8   |                   t o k e n :   s t r , 
 
 2 1 9   |                   * , 
 
 2 2 0   |                   v e r i f y :   b o o l   =   F a l s e ,     #   n o q a :   A R G 0 0 2         r e s e r v e d   f o r   f u t u r e   s i g   v e r i f i c a t i o n 
 
         |                                                                 ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   R U F 1 0 0 
 
 2 2 1   |                   s e c r e t :   s t r   |   N o n e   =   N o n e ,     #   n o q a :   A R G 0 0 2         r e s e r v e d   f o r   f u t u r e   s i g   v e r i f i c a t i o n 
 
 2 2 2   |           )   - >   R B A C M a n i f e s t : 
 
         | 
 
         =   h e l p :   R e m o v e   u n u s e d   ` n o q a `   d i r e c t i v e 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ r b a c . p y : 2 2 1 : 3 7 :   R U F 1 0 0   [ * ]   U n u s e d   ` n o q a `   d i r e c t i v e   ( n o n - e n a b l e d :   ` A R G 0 0 2 ` ) 
 
         | 
 
 2 1 9   |                   * , 
 
 2 2 0   |                   v e r i f y :   b o o l   =   F a l s e ,     #   n o q a :   A R G 0 0 2         r e s e r v e d   f o r   f u t u r e   s i g   v e r i f i c a t i o n 
 
 2 2 1   |                   s e c r e t :   s t r   |   N o n e   =   N o n e ,     #   n o q a :   A R G 0 0 2         r e s e r v e d   f o r   f u t u r e   s i g   v e r i f i c a t i o n 
 
         |                                                                           ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   R U F 1 0 0 
 
 2 2 2   |           )   - >   R B A C M a n i f e s t : 
 
 2 2 3   |                   " " " D e c o d e   a   J W T   a n d   r e g i s t e r   t h e   a c t o r   f r o m   i t s   c l a i m s . 
 
         | 
 
         =   h e l p :   R e m o v e   u n u s e d   ` n o q a `   d i r e c t i v e 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ r b a c . p y : 2 5 2 : 2 3 :   P L R 2 0 0 4   M a g i c   v a l u e   u s e d   i n   c o m p a r i s o n ,   c o n s i d e r   r e p l a c i n g   ` 4 `   w i t h   a   c o n s t a n t   v a r i a b l e 
 
         | 
 
 2 5 0   |                   #   A d d   p a d d i n g   i f   n e c e s s a r y 
 
 2 5 1   |                   p a d d i n g   =   4   -   l e n ( p a y l o a d _ b 6 4 )   %   4 
 
 2 5 2   |                   i f   p a d d i n g   ! =   4 : 
 
         |                                               ^   P L R 2 0 0 4 
 
 2 5 3   |                           p a y l o a d _ b 6 4   + =   " = "   *   p a d d i n g 
 
 2 5 4   |                   t r y : 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ r b a c . p y : 4 8 5 : 5 :   D 2 0 5   1   b l a n k   l i n e   r e q u i r e d   b e t w e e n   s u m m a r y   l i n e   a n d   d e s c r i p t i o n 
 
         | 
 
 4 8 4   |       d e f   _ p a r s e _ y a m l _ s a f e ( y a m l _ s t r :   s t r )   - >   A n y : 
 
 4 8 5   |   /           " " " P a r s e   * y a m l _ s t r *   u s i n g   P y Y A M L   w h e n   a v a i l a b l e ,   o t h e r w i s e   u s e   a   m i n i m a l 
 
 4 8 6   |   |           k e y : v a l u e   l i n e   p a r s e r   t h a t   h a n d l e s   f l a t   m a p p i n g s   a n d   i n l i n e   l i s t s . 
 
 4 8 7   |   | 
 
 4 8 8   |   |           T h e   m i n i m a l   p a r s e r   s u p p o r t s : 
 
 4 8 9   |   |           *   ` ` k e y :   s c a l a r _ v a l u e ` ` 
 
 4 9 0   |   |           *   ` ` k e y :   [ i t e m 1 ,   i t e m 2 ] ` `   ( i n l i n e   l i s t ,   s i n g l e - l i n e ) 
 
 4 9 1   |   |           *   ` ` k e y : ` `   w i t h   i n d e n t e d   l i s t   i t e m s   ( ` `     -   i t e m ` ` ) 
 
 4 9 2   |   | 
 
 4 9 3   |   |           R a i s e s : 
 
 4 9 4   |   |                   V a l u e E r r o r :   I f   t h e   m i n i m a l   p a r s e r   c a n n o t   h a n d l e   t h e   i n p u t   w h e n   P y Y A M L 
 
 4 9 5   |   |                           i s   n o t   i n s t a l l e d . 
 
 4 9 6   |   |           " " " 
 
         |   | _ _ _ _ _ _ _ ^   D 2 0 5 
 
 4 9 7   |               t r y : 
 
 4 9 8   |                       i m p o r t   y a m l     #   t y p e :   i g n o r e [ i m p o r t - u n t y p e d ] 
 
         | 
 
         =   h e l p :   I n s e r t   s i n g l e   b l a n k   l i n e 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ s c o p e . p y : 3 3 : 8 :   T C 0 0 3   M o v e   s t a n d a r d   l i b r a r y   i m p o r t   ` o s `   i n t o   a   t y p e - c h e c k i n g   b l o c k 
 
       | 
 
 3 1   |   f r o m   _ _ f u t u r e _ _   i m p o r t   a n n o t a t i o n s 
 
 3 2   | 
 
 3 3   |   i m p o r t   o s 
 
       |                 ^ ^   T C 0 0 3 
 
 3 4   |   i m p o r t   r e 
 
 3 5   |   i m p o r t   t h r e a d i n g 
 
       | 
 
       =   h e l p :   M o v e   i n t o   t y p e - c h e c k i n g   b l o c k 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ s c o p e . p y : 7 1 : 5 :   P L R 0 9 1 2   T o o   m a n y   b r a n c h e s   ( 1 7   >   1 2 ) 
 
       | 
 
 7 1   |   d e f   _ p a r s e _ s c o p e _ y a m l ( y a m l _ t e x t :   s t r )   - >   d i c t [ s t r ,   A n y ] : 
 
       |           ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 9 1 2 
 
 7 2   |           " " " P a r s e   a   s c o p e   m a n i f e s t   Y A M L   w i t h o u t   r e q u i r i n g   P y Y A M L . 
 
       | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ s c o p e . p y : 1 1 5 : 6 0 :   P L R 2 0 0 4   M a g i c   v a l u e   u s e d   i n   c o m p a r i s o n ,   c o n s i d e r   r e p l a c i n g   ` 2 `   w i t h   a   c o n s t a n t   v a r i a b l e 
 
         | 
 
 1 1 4   |                   #   r e s o u r c e _ a c t i o n s :   s u b - k e y   ( i n d e n t   = =   2 ,   n o t   a   l i s t ) 
 
 1 1 5   |                   i f   c u r r e n t _ k e y   = =   " r e s o u r c e _ a c t i o n s "   a n d   i n d e n t   = =   2   a n d   n o t   s t r i p p e d . s t a r t s w i t h ( " - " ) : 
 
         |                                                                                                                         ^   P L R 2 0 0 4 
 
 1 1 6   |                           m   =   r e . m a t c h ( r " ^ ( [ \ w . * - ] + ) \ s * : " ,   s t r i p p e d ) 
 
 1 1 7   |                           i f   m : 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ s c o p e . p y : 1 3 4 : 5 2 :   P L R 2 0 0 4   M a g i c   v a l u e   u s e d   i n   c o m p a r i s o n ,   c o n s i d e r   r e p l a c i n g   ` 2 `   w i t h   a   c o n s t a n t   v a r i a b l e 
 
         | 
 
 1 3 3   |                   #   m e t a d a t a   k e y - v a l u e   p a i r s 
 
 1 3 4   |                   i f   c u r r e n t _ k e y   = =   " m e t a d a t a "   a n d   i n d e n t   > =   2   a n d   n o t   s t r i p p e d . s t a r t s w i t h ( " - " ) : 
 
         |                                                                                                         ^   P L R 2 0 0 4 
 
 1 3 5   |                           m   =   _ R E _ K V . m a t c h ( s t r i p p e d ) 
 
 1 3 6   |                           i f   m : 
 
         | 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ s c o p e . p y : 5 6 3 : 2 8 :   R U F 1 0 0   [ * ]   U n u s e d   ` n o q a `   d i r e c t i v e   ( n o n - e n a b l e d :   ` B L E 0 0 1 ` ) 
 
         | 
 
 5 6 1   |                                   s e v e r i t y = " h i g h " , 
 
 5 6 2   |                           ) 
 
 5 6 3   |                   e x c e p t   E x c e p t i o n :     #   n o q a :   B L E 0 0 1 
 
         |                                                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   R U F 1 0 0 
 
 5 6 4   |                           p a s s 
 
         | 
 
         =   h e l p :   R e m o v e   u n u s e d   ` n o q a `   d i r e c t i v e 
 
 
 
 s r c \ s p a n f o r g e \ s d k \ s c o p e . p y : 5 7 8 : 2 8 :   R U F 1 0 0   [ * ]   U n u s e d   ` n o q a `   d i r e c t i v e   ( n o n - e n a b l e d :   ` B L E 0 0 1 ` ) 
 
         | 
 
 5 7 6   |                           s f _ a u d i t . a p p e n d ( p a y l o a d . t o _ d i c t ( ) ,   " s p a n f o r g e . s c o p e . v 1 " ) 
 
 5 7 7   |                           s e l f . _ c i r c u i t _ b r e a k e r . r e c o r d _ s u c c e s s ( ) 
 
 5 7 8   |                   e x c e p t   E x c e p t i o n :     #   n o q a :   B L E 0 0 1 
 
         |                                                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   R U F 1 0 0 
 
 5 7 9   |                           s e l f . _ c i r c u i t _ b r e a k e r . r e c o r d _ f a i l u r e ( ) 
 
         | 
 
         =   h e l p :   R e m o v e   u n u s e d   ` n o q a `   d i r e c t i v e 
 
 
 
 s r c \ s p a n f o r g e \ t e s t i n g . p y : 4 7 6 : 5 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
         | 
 
 4 7 4   |                       a s s e r t   r e s u l t . v e r d i c t   = =   " P A S S " 
 
 4 7 5   |               " " " 
 
 4 7 6   |   /           f r o m   s p a n f o r g e . t e s t i n g _ m o c k s   i m p o r t   M o c k S F G a t e 
 
 4 7 7   |   |           f r o m   s p a n f o r g e . s d k . _ t y p e s   i m p o r t   G a t e E v a l u a t i o n R e s u l t 
 
         |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   I 0 0 1 
 
 4 7 8   | 
 
 4 7 9   |               m o c k   =   M o c k S F G a t e ( ) 
 
         | 
 
         =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 s r c \ s p a n f o r g e \ v a l i d a t e . p y : 4 7 9 : 3 1 :   R U F 1 0 0   [ * ]   U n u s e d   ` n o q a `   d i r e c t i v e   ( n o n - e n a b l e d :   ` B L E 0 0 1 ` ) 
 
         | 
 
 4 7 7   |                           r a i s e 
 
 4 7 8   |                   v i o l a t i o n s . a p p e n d ( s t r ( e x c ) ) 
 
 4 7 9   |           e x c e p t   E x c e p t i o n   a s   e x c :     #   n o q a :   B L E 0 0 1 
 
         |                                                               ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   R U F 1 0 0 
 
 4 8 0   |                   i f   m o d e   i s   E n f o r c e m e n t M o d e . S T R I C T : 
 
 4 8 1   |                           r a i s e   S c h e m a V a l i d a t i o n E r r o r ( f i e l d = " < u n k n o w n > " ,   r e c e i v e d = N o n e ,   r e a s o n = s t r ( e x c ) )   f r o m   e x c 
 
         | 
 
         =   h e l p :   R e m o v e   u n u s e d   ` n o q a `   d i r e c t i v e 
 
 
 
 s r c \ s p a n f o r g e \ v a l i d a t e . p y : 7 0 8 : 1 7 :   P E R F 4 0 1   U s e   ` l i s t . e x t e n d `   t o   c r e a t e   a   t r a n s f o r m e d   l i s t 
 
         | 
 
 7 0 6   |                       f o r   r f   i n   r e q u i r e d : 
 
 7 0 7   |                               i f   r f   n o t   i n   r e c o r d : 
 
 7 0 8   |   /                                   f i n d i n g s . a p p e n d ( 
 
 7 0 9   |   |                                           D a t a s e t S c a n F i n d i n g ( 
 
 7 1 0   |   |                                                   r o w = r o w _ i d x , 
 
 7 1 1   |   |                                                   f i e l d = r f , 
 
 7 1 2   |   |                                                   i s s u e _ t y p e = " s c h e m a _ v i o l a t i o n " , 
 
 7 1 3   |   |                                                   d e t a i l = f " r e q u i r e d   f i e l d   ' { r f } '   i s   m i s s i n g " , 
 
 7 1 4   |   |                                           ) 
 
 7 1 5   |   |                                   ) 
 
         |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   P E R F 4 0 1 
 
 7 1 6   | 
 
 7 1 7   |                       #   P I I   c h e c k s 
 
         | 
 
         =   h e l p :   R e p l a c e   f o r   l o o p   w i t h   l i s t . e x t e n d 
 
 
 
 t e s t s \ c h a o s \ t e s t _ s e r v i c e _ u n a v a i l a b i l i t y . p y : 1 2 : 1 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
       | 
 
 1 0   |       A l l   t e s t s   a r e   s e l f - c o n t a i n e d   ( n o   e x t e r n a l   s e r v i c e s   r e q u i r e d ) . 
 
 1 1   |       " " " 
 
 1 2   |   /   f r o m   _ _ f u t u r e _ _   i m p o r t   a n n o t a t i o n s 
 
 1 3   |   | 
 
 1 4   |   |   i m p o r t   l o g g i n g 
 
 1 5   |   |   f r o m   t y p i n g   i m p o r t   A n y 
 
 1 6   |   |   f r o m   u n i t t e s t . m o c k   i m p o r t   p a t c h 
 
 1 7   |   | 
 
 1 8   |   |   i m p o r t   p y t e s t 
 
 1 9   |   | 
 
 2 0   |   |   f r o m   s p a n f o r g e . s d k . _ b a s e   i m p o r t   S F C l i e n t C o n f i g 
 
       |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   I 0 0 1 
 
       | 
 
       =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ c h a o s \ t e s t _ s e r v i c e _ u n a v a i l a b i l i t y . p y : 1 3 9 : 1 4 :   R U F 0 3 4   U s e l e s s   ` i f ` - ` e l s e `   c o n d i t i o n 
 
         | 
 
 1 3 7   |                   ) 
 
 1 3 8   |                   a s s e r t   a n y ( 
 
 1 3 9   |                           ( r   i f   i s i n s t a n c e ( r ,   d i c t )   e l s e   r ) . g e t ( " p r o j e c t _ i d " )   = =   " c h a o s - p r o j " 
 
         |                             ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   R U F 0 3 4 
 
 1 4 0   |                           f o r   r   i n   r e c o r d s 
 
 1 4 1   |                   ) 
 
         | 
 
 
 
 t e s t s \ c h a o s \ t e s t _ s e r v i c e _ u n a v a i l a b i l i t y . p y : 1 5 4 : 1 7 :   R U F 0 3 4   U s e l e s s   ` i f ` - ` e l s e `   c o n d i t i o n 
 
         | 
 
 1 5 2   |                   r e c o r d s   =   c l i e n t . e x p o r t ( s c h e m a _ k e y = " h a l l u c c h e c k . s c o r e . v 1 " ,   p r o j e c t _ i d = " k v - c h e c k " ) 
 
 1 5 3   |                   f o r   r   i n   r e c o r d s : 
 
 1 5 4   |                           d   =   r   i f   i s i n s t a n c e ( r ,   d i c t )   e l s e   r 
 
         |                                   ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   R U F 0 3 4 
 
 1 5 5   |                           a s s e r t   " c h a o s - t e s t - s i g n i n g - k e y "   n o t   i n   s t r ( d ) 
 
         | 
 
 
 
 t e s t s \ c h a o s \ t e s t _ s e r v i c e _ u n a v a i l a b i l i t y . p y : 2 4 0 : 1 3 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
         | 
 
 2 3 8   |           d e f   t e s t _ f a l l b a c k _ c o u n t e r _ i n c r e m e n t s ( s e l f )   - >   N o n e : 
 
 2 3 9   |                   t r y : 
 
 2 4 0   |                           f r o m   s p a n f o r g e . s d k . f a l l b a c k   i m p o r t   F A L L B A C K _ A C T I V A T I O N S _ T O T A L ,   r e c o r d _ f a l l b a c k _ a c t i v a t i o n 
 
         |                           ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   I 0 0 1 
 
 2 4 1   | 
 
 2 4 2   |                           b e f o r e   =   F A L L B A C K _ A C T I V A T I O N S _ T O T A L . _ v a l u e . g e t ( )   i f   h a s a t t r ( F A L L B A C K _ A C T I V A T I O N S _ T O T A L ,   " _ v a l u e " )   e l s e   0 
 
         | 
 
         =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ b a t c h _ e x p o r t e r . p y : 8 : 1 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
       | 
 
   6   |       " " " 
 
   7   | 
 
   8   |   /   f r o m   _ _ f u t u r e _ _   i m p o r t   a n n o t a t i o n s 
 
   9   |   | 
 
 1 0   |   |   i m p o r t   t h r e a d i n g 
 
 1 1   |   |   i m p o r t   t i m e 
 
 1 2   |   |   i m p o r t   u n i t t e s t 
 
 1 3   |   |   f r o m   t y p i n g   i m p o r t   A n y 
 
 1 4   |   |   f r o m   u n i t t e s t . m o c k   i m p o r t   M a g i c M o c k 
 
 1 5   |   | 
 
 1 6   |   |   f r o m   s p a n f o r g e . _ b a t c h _ e x p o r t e r   i m p o r t   ( 
 
 1 7   |   |           B a t c h E x p o r t e r , 
 
 1 8   |   |           _ C I R C U I T _ B R E A K E R _ T H R E S H O L D , 
 
 1 9   |   |           g e t _ a g g r e g a t e _ h e a l t h , 
 
 2 0   |   |   ) 
 
       |   | _ ^   I 0 0 1 
 
       | 
 
       =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ b a t c h _ e x p o r t e r . p y : 1 2 6 : 9 :   F 8 4 1   L o c a l   v a r i a b l e   ` r e s u l t `   i s   a s s i g n e d   t o   b u t   n e v e r   u s e d 
 
         | 
 
 1 2 4   |                   b e x p . p u t ( _ m a k e _ e v e n t ( " f i r s t " ) ) 
 
 1 2 5   |                   #   T h i s   s e c o n d   p u t   s h o u l d   b e   d r o p p e d   ( q u e u e   f u l l ) . 
 
 1 2 6   |                   r e s u l t   =   b e x p . p u t ( _ m a k e _ e v e n t ( " s e c o n d " ) ) 
 
         |                   ^ ^ ^ ^ ^ ^   F 8 4 1 
 
 1 2 7   |                   #   A l l o w   t h e   b l o c k i n g   e x p o r t   t o   f i n i s h   s o   s h u t d o w n   c o m p l e t e s   c l e a n l y . 
 
 1 2 8   |                   b a r r i e r . s e t ( ) 
 
         | 
 
         =   h e l p :   R e m o v e   a s s i g n m e n t   t o   u n u s e d   v a r i a b l e   ` r e s u l t ` 
 
 
 
 t e s t s \ t e s t _ c a c h e . p y : 3 : 1 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
       | 
 
   1   |       " " " T e s t s   f o r   s p a n f o r g e . c a c h e       S e m a n t i c C a c h e ,   b a c k e n d s ,   @ c a c h e d   d e c o r a t o r . " " " 
 
   2   | 
 
   3   |   /   f r o m   _ _ f u t u r e _ _   i m p o r t   a n n o t a t i o n s 
 
   4   |   | 
 
   5   |   |   i m p o r t   a s y n c i o 
 
   6   |   |   i m p o r t   t e m p f i l e 
 
   7   |   |   i m p o r t   t i m e 
 
   8   |   |   f r o m   t y p i n g   i m p o r t   A n y 
 
   9   |   | 
 
 1 0   |   |   i m p o r t   p y t e s t 
 
 1 1   |   | 
 
 1 2   |   |   f r o m   s p a n f o r g e . c a c h e   i m p o r t   ( 
 
 1 3   |   |           C a c h e B a c k e n d E r r o r , 
 
 1 4   |   |           C a c h e E n t r y , 
 
 1 5   |   |           I n M e m o r y B a c k e n d , 
 
 1 6   |   |           S Q L i t e B a c k e n d , 
 
 1 7   |   |           S e m a n t i c C a c h e , 
 
 1 8   |   |           c a c h e d , 
 
 1 9   |   |   ) 
 
       |   | _ ^   I 0 0 1 
 
       | 
 
       =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ c a c h e . p y : 6 : 8 :   F 4 0 1   [ * ]   ` t e m p f i l e `   i m p o r t e d   b u t   u n u s e d 
 
     | 
 
 5   |   i m p o r t   a s y n c i o 
 
 6   |   i m p o r t   t e m p f i l e 
 
     |                 ^ ^ ^ ^ ^ ^ ^ ^   F 4 0 1 
 
 7   |   i m p o r t   t i m e 
 
 8   |   f r o m   t y p i n g   i m p o r t   A n y 
 
     | 
 
     =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` t e m p f i l e ` 
 
 
 
 t e s t s \ t e s t _ c l i _ a u d i t _ m o d u l e . p y : 7 : 2 1 :   T C 0 0 3   M o v e   s t a n d a r d   l i b r a r y   i m p o r t   ` p a t h l i b . P a t h `   i n t o   a   t y p e - c h e c k i n g   b l o c k 
 
     | 
 
 5   |   i m p o r t   a r g p a r s e 
 
 6   |   i m p o r t   j s o n 
 
 7   |   f r o m   p a t h l i b   i m p o r t   P a t h 
 
     |                                           ^ ^ ^ ^   T C 0 0 3 
 
 8   |   f r o m   t y p e s   i m p o r t   S i m p l e N a m e s p a c e 
 
     | 
 
     =   h e l p :   M o v e   i n t o   t y p e - c h e c k i n g   b l o c k 
 
 
 
 t e s t s \ t e s t _ c l i _ a u d i t _ m o d u l e . p y : 1 0 : 8 :   T C 0 0 2   M o v e   t h i r d - p a r t y   i m p o r t   ` p y t e s t `   i n t o   a   t y p e - c h e c k i n g   b l o c k 
 
       | 
 
   8   |   f r o m   t y p e s   i m p o r t   S i m p l e N a m e s p a c e 
 
   9   | 
 
 1 0   |   i m p o r t   p y t e s t 
 
       |                 ^ ^ ^ ^ ^ ^   T C 0 0 2 
 
 1 1   | 
 
 1 2   |   i m p o r t   s p a n f o r g e . _ c l i _ a u d i t   a s   c l i _ a u d i t 
 
       | 
 
       =   h e l p :   M o v e   i n t o   t y p e - c h e c k i n g   b l o c k 
 
 
 
 t e s t s \ t e s t _ c l i _ a u d i t _ m o d u l e . p y : 1 4 9 : 5 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
         | 
 
 1 4 7   |               c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 1 4 8   |       )   - >   N o n e : 
 
 1 4 9   |   /           f r o m   s p a n f o r g e . e x c e p t i o n s   i m p o r t   S i g n i n g E r r o r 
 
 1 5 0   |   |           i m p o r t   s p a n f o r g e . s i g n i n g   a s   s i g n i n g 
 
         |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   I 0 0 1 
 
 1 5 1   | 
 
 1 5 2   |               e v e n t _ f i l e   =   t m p _ p a t h   /   " e v e n t s . j s o n l " 
 
         | 
 
         =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ c l i _ a u d i t _ m o d u l e . p y : 1 5 0 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s i g n i n g `   i n   l i e u   o f   a l i a s 
 
         | 
 
 1 4 8   |   )   - >   N o n e : 
 
 1 4 9   |           f r o m   s p a n f o r g e . e x c e p t i o n s   i m p o r t   S i g n i n g E r r o r 
 
 1 5 0   |           i m p o r t   s p a n f o r g e . s i g n i n g   a s   s i g n i n g 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 1 5 1   | 
 
 1 5 2   |           e v e n t _ f i l e   =   t m p _ p a t h   /   " e v e n t s . j s o n l " 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s i g n i n g ` 
 
 
 
 t e s t s \ t e s t _ c l i _ a u d i t _ m o d u l e . p y : 1 7 2 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s i g n i n g `   i n   l i e u   o f   a l i a s 
 
         | 
 
 1 7 0   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 1 7 1   |   )   - >   N o n e : 
 
 1 7 2   |           i m p o r t   s p a n f o r g e . s i g n i n g   a s   s i g n i n g 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 1 7 3   | 
 
 1 7 4   |           e v e n t _ f i l e   =   t m p _ p a t h   /   " e v e n t s . j s o n l " 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s i g n i n g ` 
 
 
 
 t e s t s \ t e s t _ c l i _ a u d i t _ m o d u l e . p y : 2 2 4 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s i g n i n g `   i n   l i e u   o f   a l i a s 
 
         | 
 
 2 2 2   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 2 2 3   |   )   - >   N o n e : 
 
 2 2 4   |           i m p o r t   s p a n f o r g e . s i g n i n g   a s   s i g n i n g 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 2 2 5   | 
 
 2 2 6   |           e v e n t _ f i l e   =   t m p _ p a t h   /   " e v e n t s . j s o n l " 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s i g n i n g ` 
 
 
 
 t e s t s \ t e s t _ c l i _ a u d i t _ m o d u l e . p y : 2 4 7 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s i g n i n g `   i n   l i e u   o f   a l i a s 
 
         | 
 
 2 4 5   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 2 4 6   |   )   - >   N o n e : 
 
 2 4 7   |           i m p o r t   s p a n f o r g e . s i g n i n g   a s   s i g n i n g 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 2 4 8   | 
 
 2 4 9   |           e v e n t _ f i l e   =   t m p _ p a t h   /   " e v e n t s . j s o n l " 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s i g n i n g ` 
 
 
 
 t e s t s \ t e s t _ c l i _ a u d i t _ m o d u l e . p y : 2 7 2 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s i g n i n g `   i n   l i e u   o f   a l i a s 
 
         | 
 
 2 7 0   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 2 7 1   |   )   - >   N o n e : 
 
 2 7 2   |           i m p o r t   s p a n f o r g e . s i g n i n g   a s   s i g n i n g 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 2 7 3   | 
 
 2 7 4   |           e v e n t _ f i l e   =   t m p _ p a t h   /   " e v e n t s . j s o n l " 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s i g n i n g ` 
 
 
 
 t e s t s \ t e s t _ c l i _ a u d i t _ m o d u l e . p y : 3 1 8 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   c o n f i g `   i n   l i e u   o f   a l i a s 
 
         | 
 
 3 1 6   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 3 1 7   |   )   - >   N o n e : 
 
 3 1 8   |           i m p o r t   s p a n f o r g e . c o n f i g   a s   c o n f i g 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 3 1 9   |           i m p o r t   s p a n f o r g e . r e d a c t   a s   r e d a c t 
 
 3 2 0   |           i m p o r t   s p a n f o r g e . s i g n i n g   a s   s i g n i n g 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   c o n f i g ` 
 
 
 
 t e s t s \ t e s t _ c l i _ a u d i t _ m o d u l e . p y : 3 1 9 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   r e d a c t `   i n   l i e u   o f   a l i a s 
 
         | 
 
 3 1 7   |   )   - >   N o n e : 
 
 3 1 8   |           i m p o r t   s p a n f o r g e . c o n f i g   a s   c o n f i g 
 
 3 1 9   |           i m p o r t   s p a n f o r g e . r e d a c t   a s   r e d a c t 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 3 2 0   |           i m p o r t   s p a n f o r g e . s i g n i n g   a s   s i g n i n g 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   r e d a c t ` 
 
 
 
 t e s t s \ t e s t _ c l i _ a u d i t _ m o d u l e . p y : 3 2 0 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s i g n i n g `   i n   l i e u   o f   a l i a s 
 
         | 
 
 3 1 8   |           i m p o r t   s p a n f o r g e . c o n f i g   a s   c o n f i g 
 
 3 1 9   |           i m p o r t   s p a n f o r g e . r e d a c t   a s   r e d a c t 
 
 3 2 0   |           i m p o r t   s p a n f o r g e . s i g n i n g   a s   s i g n i n g 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 3 2 1   | 
 
 3 2 2   |           e v e n t _ f i l e   =   t m p _ p a t h   /   " e v e n t s . j s o n l " 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s i g n i n g ` 
 
 
 
 t e s t s \ t e s t _ c l i _ a u d i t _ m o d u l e . p y : 3 5 1 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   c o n f i g `   i n   l i e u   o f   a l i a s 
 
         | 
 
 3 4 9   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 3 5 0   |   )   - >   N o n e : 
 
 3 5 1   |           i m p o r t   s p a n f o r g e . c o n f i g   a s   c o n f i g 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 3 5 2   |           i m p o r t   s p a n f o r g e . r e d a c t   a s   r e d a c t 
 
 3 5 3   |           i m p o r t   s p a n f o r g e . s i g n i n g   a s   s i g n i n g 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   c o n f i g ` 
 
 
 
 t e s t s \ t e s t _ c l i _ a u d i t _ m o d u l e . p y : 3 5 2 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   r e d a c t `   i n   l i e u   o f   a l i a s 
 
         | 
 
 3 5 0   |   )   - >   N o n e : 
 
 3 5 1   |           i m p o r t   s p a n f o r g e . c o n f i g   a s   c o n f i g 
 
 3 5 2   |           i m p o r t   s p a n f o r g e . r e d a c t   a s   r e d a c t 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 3 5 3   |           i m p o r t   s p a n f o r g e . s i g n i n g   a s   s i g n i n g 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   r e d a c t ` 
 
 
 
 t e s t s \ t e s t _ c l i _ a u d i t _ m o d u l e . p y : 3 5 3 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s i g n i n g `   i n   l i e u   o f   a l i a s 
 
         | 
 
 3 5 1   |           i m p o r t   s p a n f o r g e . c o n f i g   a s   c o n f i g 
 
 3 5 2   |           i m p o r t   s p a n f o r g e . r e d a c t   a s   r e d a c t 
 
 3 5 3   |           i m p o r t   s p a n f o r g e . s i g n i n g   a s   s i g n i n g 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 3 5 4   | 
 
 3 5 5   |           e v e n t _ f i l e   =   t m p _ p a t h   /   " e v e n t s . j s o n l " 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s i g n i n g ` 
 
 
 
 t e s t s \ t e s t _ c l i _ a u d i t _ m o d u l e . p y : 3 8 1 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   c o n f i g `   i n   l i e u   o f   a l i a s 
 
         | 
 
 3 7 9   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 3 8 0   |   )   - >   N o n e : 
 
 3 8 1   |           i m p o r t   s p a n f o r g e . c o n f i g   a s   c o n f i g 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 3 8 2   |           i m p o r t   s p a n f o r g e . r e d a c t   a s   r e d a c t 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   c o n f i g ` 
 
 
 
 t e s t s \ t e s t _ c l i _ a u d i t _ m o d u l e . p y : 3 8 2 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   r e d a c t `   i n   l i e u   o f   a l i a s 
 
         | 
 
 3 8 0   |   )   - >   N o n e : 
 
 3 8 1   |           i m p o r t   s p a n f o r g e . c o n f i g   a s   c o n f i g 
 
 3 8 2   |           i m p o r t   s p a n f o r g e . r e d a c t   a s   r e d a c t 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 3 8 3   | 
 
 3 8 4   |           e v e n t _ f i l e   =   t m p _ p a t h   /   " e v e n t s . j s o n l " 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   r e d a c t ` 
 
 
 
 t e s t s \ t e s t _ c l i _ a u d i t _ m o d u l e . p y : 4 5 3 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s i g n i n g `   i n   l i e u   o f   a l i a s 
 
         | 
 
 4 5 1   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 4 5 2   |   )   - >   N o n e : 
 
 4 5 3   |           i m p o r t   s p a n f o r g e . s i g n i n g   a s   s i g n i n g 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 4 5 4   | 
 
 4 5 5   |           e v e n t _ f i l e   =   t m p _ p a t h   /   " a u d i t . j s o n l " 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s i g n i n g ` 
 
 
 
 t e s t s \ t e s t _ c l i _ a u d i t _ m o d u l e . p y : 4 8 0 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s i g n i n g `   i n   l i e u   o f   a l i a s 
 
         | 
 
 4 7 8   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 4 7 9   |   )   - >   N o n e : 
 
 4 8 0   |           i m p o r t   s p a n f o r g e . s i g n i n g   a s   s i g n i n g 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 4 8 1   | 
 
 4 8 2   |           e v e n t _ f i l e   =   t m p _ p a t h   /   " a u d i t . j s o n l " 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s i g n i n g ` 
 
 
 
 t e s t s \ t e s t _ c l i _ a u d i t _ m o d u l e . p y : 5 6 7 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s i g n i n g `   i n   l i e u   o f   a l i a s 
 
         | 
 
 5 6 5   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 5 6 6   |   )   - >   N o n e : 
 
 5 6 7   |           i m p o r t   s p a n f o r g e . s i g n i n g   a s   s i g n i n g 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 5 6 8   | 
 
 5 6 9   |           e v e n t _ f i l e   =   t m p _ p a t h   /   " e v e n t s . j s o n l " 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s i g n i n g ` 
 
 
 
 t e s t s \ t e s t _ c l i _ a u d i t _ m o d u l e . p y : 5 9 3 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s i g n i n g `   i n   l i e u   o f   a l i a s 
 
         | 
 
 5 9 1   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 5 9 2   |   )   - >   N o n e : 
 
 5 9 3   |           i m p o r t   s p a n f o r g e . s i g n i n g   a s   s i g n i n g 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 5 9 4   | 
 
 5 9 5   |           e v e n t _ f i l e   =   t m p _ p a t h   /   " e v e n t s . j s o n l " 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s i g n i n g ` 
 
 
 
 t e s t s \ t e s t _ c l i _ c o m p l i a n c e _ d a t a s e t . p y : 2 4 : 8 :   F 4 0 1   [ * ]   ` o s `   i m p o r t e d   b u t   u n u s e d 
 
       | 
 
 2 2   |   i m p o r t   i o 
 
 2 3   |   i m p o r t   j s o n 
 
 2 4   |   i m p o r t   o s 
 
       |                 ^ ^   F 4 0 1 
 
 2 5   |   i m p o r t   p a t h l i b 
 
 2 6   |   f r o m   t y p i n g   i m p o r t   A n y 
 
       | 
 
       =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` o s ` 
 
 
 
 t e s t s \ t e s t _ c l i _ c o m p l i a n c e _ d a t a s e t . p y : 3 3 : 5 :   F 4 0 1   [ * ]   ` s p a n f o r g e . s d k . d a t a s e t _ s c a n n e r . D a t a s e t C o m p l i a n c e R e p o r t `   i m p o r t e d   b u t   u n u s e d 
 
       | 
 
 3 1   |   f r o m   s p a n f o r g e . s d k . d a t a s e t _ s c a n n e r   i m p o r t   ( 
 
 3 2   |           A r t i c l e 1 0 C l a u s e , 
 
 3 3   |           D a t a s e t C o m p l i a n c e R e p o r t , 
 
       |           ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   F 4 0 1 
 
 3 4   |           s c a n _ d a t a s e t _ c o m p l i a n c e , 
 
 3 5   |   ) 
 
       | 
 
       =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` s p a n f o r g e . s d k . d a t a s e t _ s c a n n e r . D a t a s e t C o m p l i a n c e R e p o r t ` 
 
 
 
 t e s t s \ t e s t _ c l i _ c o m p l i a n c e _ d a t a s e t . p y : 3 6 6 : 1 6 :   F 4 0 1   [ * ]   ` i m p o r t l i b `   i m p o r t e d   b u t   u n u s e d 
 
         | 
 
 3 6 4   |           )   - >   N o n e : 
 
 3 6 5   |                   " " " W h e n   r e p o r t l a b   i s   n o t   i n s t a l l e d   t h e   C L I   s h o u l d   p r i n t   a   c l e a r   e r r o r . " " " 
 
 3 6 6   |                   i m p o r t   i m p o r t l i b 
 
         |                                 ^ ^ ^ ^ ^ ^ ^ ^ ^   F 4 0 1 
 
 3 6 7   |                   i m p o r t   s y s 
 
         | 
 
         =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` i m p o r t l i b ` 
 
 
 
 t e s t s \ t e s t _ c l i _ c o m p l i a n c e _ m o d u l e . p y : 1 1 : 8 :   T C 0 0 2   M o v e   t h i r d - p a r t y   i m p o r t   ` p y t e s t `   i n t o   a   t y p e - c h e c k i n g   b l o c k 
 
       | 
 
   9   |   f r o m   t y p e s   i m p o r t   S i m p l e N a m e s p a c e 
 
 1 0   | 
 
 1 1   |   i m p o r t   p y t e s t 
 
       |                 ^ ^ ^ ^ ^ ^   T C 0 0 2 
 
 1 2   | 
 
 1 3   |   i m p o r t   s p a n f o r g e . _ c l i _ c o m p l i a n c e   a s   c l i _ c o m p l i a n c e 
 
       | 
 
       =   h e l p :   M o v e   i n t o   t y p e - c h e c k i n g   b l o c k 
 
 
 
 t e s t s \ t e s t _ c l i _ c o m p l i a n c e _ m o d u l e . p y : 1 4 6 : 1 2 :   B 0 0 9   [ * ]   D o   n o t   c a l l   ` g e t a t t r `   w i t h   a   c o n s t a n t   a t t r i b u t e   v a l u e .   I t   i s   n o t   a n y   s a f e r   t h a n   n o r m a l   p r o p e r t y   a c c e s s . 
 
         | 
 
 1 4 4   |           a t t e s t a t i o n   =   c l i _ c o m p l i a n c e . _ a t t e s t a t i o n _ f r o m _ d i c t ( d a t a ) 
 
 1 4 5   | 
 
 1 4 6   |           a s s e r t   g e t a t t r ( a t t e s t a t i o n ,   " m o d e l _ i d " )   = =   " m o d e l - 1 " 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   B 0 0 9 
 
 1 4 7   |           a s s e r t   g e t a t t r ( a t t e s t a t i o n ,   " p e r i o d _ f r o m " )   = =   " 2 0 2 4 - 0 1 - 0 1 " 
 
         | 
 
         =   h e l p :   R e p l a c e   ` g e t a t t r `   w i t h   a t t r i b u t e   a c c e s s 
 
 
 
 t e s t s \ t e s t _ c l i _ c o m p l i a n c e _ m o d u l e . p y : 1 4 7 : 1 2 :   B 0 0 9   [ * ]   D o   n o t   c a l l   ` g e t a t t r `   w i t h   a   c o n s t a n t   a t t r i b u t e   v a l u e .   I t   i s   n o t   a n y   s a f e r   t h a n   n o r m a l   p r o p e r t y   a c c e s s . 
 
         | 
 
 1 4 6   |           a s s e r t   g e t a t t r ( a t t e s t a t i o n ,   " m o d e l _ i d " )   = =   " m o d e l - 1 " 
 
 1 4 7   |           a s s e r t   g e t a t t r ( a t t e s t a t i o n ,   " p e r i o d _ f r o m " )   = =   " 2 0 2 4 - 0 1 - 0 1 " 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   B 0 0 9 
 
         | 
 
         =   h e l p :   R e p l a c e   ` g e t a t t r `   w i t h   a t t r i b u t e   a c c e s s 
 
 
 
 t e s t s \ t e s t _ c l i _ c o m p l i a n c e _ m o d u l e . p y : 2 5 6 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   c o m p l i a n c e `   i n   l i e u   o f   a l i a s 
 
         | 
 
 2 5 4   |                   ) , 
 
 2 5 5   |           ) 
 
 2 5 6   |           i m p o r t   s p a n f o r g e . c o m p l i a n c e   a s   c o m p l i a n c e 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 2 5 7   | 
 
 2 5 8   |           m o n k e y p a t c h . s e t a t t r ( c o m p l i a n c e ,   " v e r i f y _ a t t e s t a t i o n _ s i g n a t u r e " ,   l a m b d a   _ a t t :   T r u e ) 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   c o m p l i a n c e ` 
 
 
 
 t e s t s \ t e s t _ c l i _ c o m p l i a n c e _ m o d u l e . p y : 4 5 8 : 5 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
         | 
 
 4 5 6   |               ) 
 
 4 5 7   | 
 
 4 5 8   |   /           i m p o r t   s p a n f o r g e . s i g n i n g   a s   s i g n i n g 
 
 4 5 9   |   |           i m p o r t   s p a n f o r g e . r e d a c t   a s   r e d a c t 
 
 4 6 0   |   |           i m p o r t   s p a n f o r g e . c o r e . c o m p l i a n c e _ m a p p i n g   a s   m a p p i n g 
 
         |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   I 0 0 1 
 
 4 6 1   | 
 
 4 6 2   |               m o n k e y p a t c h . s e t e n v ( " S P A N F O R G E _ S I G N I N G _ K E Y " ,   " s e c r e t " ) 
 
         | 
 
         =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ c l i _ c o m p l i a n c e _ m o d u l e . p y : 4 5 8 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s i g n i n g `   i n   l i e u   o f   a l i a s 
 
         | 
 
 4 5 6   |           ) 
 
 4 5 7   | 
 
 4 5 8   |           i m p o r t   s p a n f o r g e . s i g n i n g   a s   s i g n i n g 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 4 5 9   |           i m p o r t   s p a n f o r g e . r e d a c t   a s   r e d a c t 
 
 4 6 0   |           i m p o r t   s p a n f o r g e . c o r e . c o m p l i a n c e _ m a p p i n g   a s   m a p p i n g 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s i g n i n g ` 
 
 
 
 t e s t s \ t e s t _ c l i _ c o m p l i a n c e _ m o d u l e . p y : 4 5 9 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   r e d a c t `   i n   l i e u   o f   a l i a s 
 
         | 
 
 4 5 8   |           i m p o r t   s p a n f o r g e . s i g n i n g   a s   s i g n i n g 
 
 4 5 9   |           i m p o r t   s p a n f o r g e . r e d a c t   a s   r e d a c t 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 4 6 0   |           i m p o r t   s p a n f o r g e . c o r e . c o m p l i a n c e _ m a p p i n g   a s   m a p p i n g 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   r e d a c t ` 
 
 
 
 t e s t s \ t e s t _ c l i _ c o m p l i a n c e _ m o d u l e . p y : 5 9 1 : 1 2 :   F 4 0 1   [ * ]   ` o s `   i m p o r t e d   b u t   u n u s e d 
 
         | 
 
 5 8 9   |   )   - >   N o n e : 
 
 5 9 0   |           " " " c m d _ r e a d i n e s s   s h o u l d   a l w a y s   r e t u r n   a n   i n t   i n   { 0 ,   1 ,   2 } . " " " 
 
 5 9 1   |           i m p o r t   o s 
 
         |                         ^ ^   F 4 0 1 
 
 5 9 2   | 
 
 5 9 3   |           m o n k e y p a t c h . s e t e n v ( " S P A N F O R G E _ S I G N I N G _ K E Y " ,   " a "   *   6 4 ) 
 
         | 
 
         =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` o s ` 
 
 
 
 t e s t s \ t e s t _ c l i _ c o s t _ m o d u l e . p y : 7 : 2 1 :   T C 0 0 3   M o v e   s t a n d a r d   l i b r a r y   i m p o r t   ` p a t h l i b . P a t h `   i n t o   a   t y p e - c h e c k i n g   b l o c k 
 
     | 
 
 5   |   i m p o r t   a r g p a r s e 
 
 6   |   i m p o r t   j s o n 
 
 7   |   f r o m   p a t h l i b   i m p o r t   P a t h 
 
     |                                           ^ ^ ^ ^   T C 0 0 3 
 
 8   | 
 
 9   |   i m p o r t   p y t e s t 
 
     | 
 
     =   h e l p :   M o v e   i n t o   t y p e - c h e c k i n g   b l o c k 
 
 
 
 t e s t s \ t e s t _ c l i _ c o s t _ m o d u l e . p y : 9 : 8 :   T C 0 0 2   M o v e   t h i r d - p a r t y   i m p o r t   ` p y t e s t `   i n t o   a   t y p e - c h e c k i n g   b l o c k 
 
       | 
 
   7   |   f r o m   p a t h l i b   i m p o r t   P a t h 
 
   8   | 
 
   9   |   i m p o r t   p y t e s t 
 
       |                 ^ ^ ^ ^ ^ ^   T C 0 0 2 
 
 1 0   | 
 
 1 1   |   i m p o r t   s p a n f o r g e . _ c l i _ c o s t   a s   c l i _ c o s t 
 
       | 
 
       =   h e l p :   M o v e   i n t o   t y p e - c h e c k i n g   b l o c k 
 
 
 
 t e s t s \ t e s t _ c l i _ o p s _ m o d u l e . p y : 7 : 2 1 :   T C 0 0 3   M o v e   s t a n d a r d   l i b r a r y   i m p o r t   ` p a t h l i b . P a t h `   i n t o   a   t y p e - c h e c k i n g   b l o c k 
 
     | 
 
 5   |   i m p o r t   a r g p a r s e 
 
 6   |   i m p o r t   j s o n 
 
 7   |   f r o m   p a t h l i b   i m p o r t   P a t h 
 
     |                                           ^ ^ ^ ^   T C 0 0 3 
 
 8   |   f r o m   t y p e s   i m p o r t   S i m p l e N a m e s p a c e 
 
     | 
 
     =   h e l p :   M o v e   i n t o   t y p e - c h e c k i n g   b l o c k 
 
 
 
 t e s t s \ t e s t _ c l i _ o p s _ m o d u l e . p y : 1 0 : 8 :   T C 0 0 2   M o v e   t h i r d - p a r t y   i m p o r t   ` p y t e s t `   i n t o   a   t y p e - c h e c k i n g   b l o c k 
 
       | 
 
   8   |   f r o m   t y p e s   i m p o r t   S i m p l e N a m e s p a c e 
 
   9   | 
 
 1 0   |   i m p o r t   p y t e s t 
 
       |                 ^ ^ ^ ^ ^ ^   T C 0 0 2 
 
 1 1   | 
 
 1 2   |   i m p o r t   s p a n f o r g e . _ c l i _ o p s   a s   c l i _ o p s 
 
       | 
 
       =   h e l p :   M o v e   i n t o   t y p e - c h e c k i n g   b l o c k 
 
 
 
 t e s t s \ t e s t _ c l i _ o p s _ m o d u l e . p y : 1 1 6 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   g a t e `   i n   l i e u   o f   a l i a s 
 
         | 
 
 1 1 4   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 1 1 5   |   )   - >   N o n e : 
 
 1 1 6   |           i m p o r t   s p a n f o r g e . g a t e   a s   g a t e 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 1 1 7   | 
 
 1 1 8   |           m o n k e y p a t c h . s e t a t t r ( 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   g a t e ` 
 
 
 
 t e s t s \ t e s t _ c l i _ o p s _ m o d u l e . p y : 1 4 1 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   g a t e `   i n   l i e u   o f   a l i a s 
 
         | 
 
 1 3 9   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 1 4 0   |   )   - >   N o n e : 
 
 1 4 1   |           i m p o r t   s p a n f o r g e . g a t e   a s   g a t e 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 1 4 2   | 
 
 1 4 3   |           m o n k e y p a t c h . s e t a t t r ( 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   g a t e ` 
 
 
 
 t e s t s \ t e s t _ c l i _ o p s _ m o d u l e . p y : 1 8 3 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   g a t e `   i n   l i e u   o f   a l i a s 
 
         | 
 
 1 8 1   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 1 8 2   |   )   - >   N o n e : 
 
 1 8 3   |           i m p o r t   s p a n f o r g e . g a t e   a s   g a t e 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 1 8 4   | 
 
 1 8 5   |           m o n k e y p a t c h . s e t a t t r ( 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   g a t e ` 
 
 
 
 t e s t s \ t e s t _ c l i _ o p s _ m o d u l e . p y : 2 1 9 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s d k `   i n   l i e u   o f   a l i a s 
 
         | 
 
 2 1 7   |   )   - >   N o n e : 
 
 2 1 8   |           m o n k e y p a t c h . s e t a t t r ( c l i _ o p s . s y s . s t d i n ,   " i s a t t y " ,   l a m b d a :   T r u e ) 
 
 2 1 9   |           i m p o r t   s p a n f o r g e . s d k   a s   s d k 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 2 2 0   | 
 
 2 2 1   |           m o n k e y p a t c h . s e t a t t r ( 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s d k ` 
 
 
 
 t e s t s \ t e s t _ c l i _ o p s _ m o d u l e . p y : 2 6 2 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s d k `   i n   l i e u   o f   a l i a s 
 
         | 
 
 2 6 0   |   )   - >   N o n e : 
 
 2 6 1   |           m o n k e y p a t c h . s e t a t t r ( c l i _ o p s . s y s . s t d i n ,   " i s a t t y " ,   l a m b d a :   T r u e ) 
 
 2 6 2   |           i m p o r t   s p a n f o r g e . s d k   a s   s d k 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 2 6 3   | 
 
 2 6 4   |           m o n k e y p a t c h . s e t a t t r ( s d k . s f _ g a t e ,   " e v a l u a t e " ,   l a m b d a   * _ a r g s ,   * * _ k w a r g s :   ( _   f o r   _   i n   ( ) ) . t h r o w ( R u n t i m e E r r o r ( " b a d   g a t e " ) ) ) 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s d k ` 
 
 
 
 t e s t s \ t e s t _ c l i _ o p s _ m o d u l e . p y : 2 7 9 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s d k `   i n   l i e u   o f   a l i a s 
 
         | 
 
 2 7 7   |   )   - >   N o n e : 
 
 2 7 8   |           m o n k e y p a t c h . s e t a t t r ( c l i _ o p s . s y s . s t d i n ,   " i s a t t y " ,   l a m b d a :   T r u e ) 
 
 2 7 9   |           i m p o r t   s p a n f o r g e . s d k   a s   s d k 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 2 8 0   | 
 
 2 8 1   |           m o n k e y p a t c h . s e t a t t r ( 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s d k ` 
 
 
 
 t e s t s \ t e s t _ c l i _ o p s _ m o d u l e . p y : 3 0 6 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s d k `   i n   l i e u   o f   a l i a s 
 
         | 
 
 3 0 4   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 3 0 5   |   )   - >   N o n e : 
 
 3 0 6   |           i m p o r t   s p a n f o r g e . s d k   a s   s d k 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 3 0 7   | 
 
 3 0 8   |           o u t _ f i l e   =   t m p _ p a t h   /   " b a d g e . s v g " 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s d k ` 
 
 
 
 t e s t s \ t e s t _ c l i _ o p s _ m o d u l e . p y : 3 2 6 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s d k `   i n   l i e u   o f   a l i a s 
 
         | 
 
 3 2 4   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 3 2 5   |   )   - >   N o n e : 
 
 3 2 6   |           i m p o r t   s p a n f o r g e . s d k   a s   s d k 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 3 2 7   | 
 
 3 2 8   |           m o n k e y p a t c h . s e t a t t r ( 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s d k ` 
 
 
 
 t e s t s \ t e s t _ c l i _ o p s _ m o d u l e . p y : 3 4 4 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s d k `   i n   l i e u   o f   a l i a s 
 
         | 
 
 3 4 2   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 3 4 3   |   )   - >   N o n e : 
 
 3 4 4   |           i m p o r t   s p a n f o r g e . s d k   a s   s d k 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 3 4 5   | 
 
 3 4 6   |           m o n k e y p a t c h . s e t a t t r ( s d k . s f _ t r u s t ,   " g e t _ b a d g e " ,   l a m b d a   * * _ k w a r g s :   ( _   f o r   _   i n   ( ) ) . t h r o w ( R u n t i m e E r r o r ( " n o   b a d g e " ) ) ) 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s d k ` 
 
 
 
 t e s t s \ t e s t _ c l i _ o p s _ m o d u l e . p y : 3 5 8 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s d k `   i n   l i e u   o f   a l i a s 
 
         | 
 
 3 5 6   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 3 5 7   |   )   - >   N o n e : 
 
 3 5 8   |           i m p o r t   s p a n f o r g e . s d k   a s   s d k 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 3 5 9   | 
 
 3 6 0   |           m o n k e y p a t c h . s e t a t t r ( 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s d k ` 
 
 
 
 t e s t s \ t e s t _ c l i _ o p s _ m o d u l e . p y : 3 8 3 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s d k `   i n   l i e u   o f   a l i a s 
 
         | 
 
 3 8 1   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 3 8 2   |   )   - >   N o n e : 
 
 3 8 3   |           i m p o r t   s p a n f o r g e . s d k   a s   s d k 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 3 8 4   | 
 
 3 8 5   |           m o n k e y p a t c h . s e t a t t r ( 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s d k ` 
 
 
 
 t e s t s \ t e s t _ c l i _ o p s _ m o d u l e . p y : 4 0 6 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s d k `   i n   l i e u   o f   a l i a s 
 
         | 
 
 4 0 4   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 4 0 5   |   )   - >   N o n e : 
 
 4 0 6   |           i m p o r t   s p a n f o r g e . s d k   a s   s d k 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 4 0 7   | 
 
 4 0 8   |           m o n k e y p a t c h . s e t a t t r ( s d k . s f _ t r u s t ,   " g e t _ s c o r e c a r d " ,   l a m b d a   * * _ k w a r g s :   ( _   f o r   _   i n   ( ) ) . t h r o w ( R u n t i m e E r r o r ( " m i s s i n g   s c o r e c a r d " ) ) ) 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s d k ` 
 
 
 
 t e s t s \ t e s t _ c l i _ o p s _ m o d u l e . p y : 4 2 0 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s d k `   i n   l i e u   o f   a l i a s 
 
         | 
 
 4 1 8   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 4 1 9   |   )   - >   N o n e : 
 
 4 2 0   |           i m p o r t   s p a n f o r g e . s d k   a s   s d k 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 4 2 1   |           i m p o r t   s p a n f o r g e . s d k . c o n f i g   a s   c o n f i g 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s d k ` 
 
 
 
 t e s t s \ t e s t _ c l i _ o p s _ m o d u l e . p y : 4 2 1 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e . s d k   i m p o r t   c o n f i g `   i n   l i e u   o f   a l i a s 
 
         | 
 
 4 1 9   |   )   - >   N o n e : 
 
 4 2 0   |           i m p o r t   s p a n f o r g e . s d k   a s   s d k 
 
 4 2 1   |           i m p o r t   s p a n f o r g e . s d k . c o n f i g   a s   c o n f i g 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 4 2 2   | 
 
 4 2 3   |           m o n k e y p a t c h . s e t a t t r ( c o n f i g ,   " l o a d _ c o n f i g _ f i l e " ,   l a m b d a :   ( _   f o r   _   i n   ( ) ) . t h r o w ( F i l e N o t F o u n d E r r o r ( ) ) ) 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e . s d k   i m p o r t   c o n f i g ` 
 
 
 
 t e s t s \ t e s t _ c l i _ o p s _ m o d u l e . p y : 4 7 0 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s d k `   i n   l i e u   o f   a l i a s 
 
         | 
 
 4 6 8   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 4 6 9   |   )   - >   N o n e : 
 
 4 7 0   |           i m p o r t   s p a n f o r g e . s d k   a s   s d k 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 4 7 1   | 
 
 4 7 2   |           m o n k e y p a t c h . s e t a t t r ( 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s d k ` 
 
 
 
 t e s t s \ t e s t _ c l i _ o p s _ m o d u l e . p y : 5 0 2 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s d k `   i n   l i e u   o f   a l i a s 
 
         | 
 
 5 0 0   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 5 0 1   |   )   - >   N o n e : 
 
 5 0 2   |           i m p o r t   s p a n f o r g e . s d k   a s   s d k 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 5 0 3   | 
 
 5 0 4   |           o u t _ f i l e   =   t m p _ p a t h   /   " p a c k a g e . j s o n " 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s d k ` 
 
 
 
 t e s t s \ t e s t _ c l i _ p h a s e 1 1 _ m o d u l e . p y : 9 : 8 :   T C 0 0 2   M o v e   t h i r d - p a r t y   i m p o r t   ` p y t e s t `   i n t o   a   t y p e - c h e c k i n g   b l o c k 
 
       | 
 
   7   |   f r o m   d a t a c l a s s e s   i m p o r t   d a t a c l a s s 
 
   8   | 
 
   9   |   i m p o r t   p y t e s t 
 
       |                 ^ ^ ^ ^ ^ ^   T C 0 0 2 
 
 1 0   | 
 
 1 1   |   i m p o r t   s p a n f o r g e . _ c l i _ p h a s e 1 1   a s   c l i _ p h a s e 1 1 
 
       | 
 
       =   h e l p :   M o v e   i n t o   t y p e - c h e c k i n g   b l o c k 
 
 
 
 t e s t s \ t e s t _ c l i _ p h a s e 1 1 _ m o d u l e . p y : 1 3 8 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s d k `   i n   l i e u   o f   a l i a s 
 
         | 
 
 1 3 6   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 1 3 7   |   )   - >   N o n e : 
 
 1 3 8   |           i m p o r t   s p a n f o r g e . s d k   a s   s d k 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 1 3 9   | 
 
 1 4 0   |           m o n k e y p a t c h . s e t a t t r ( s d k . s f _ e n t e r p r i s e ,   " g e t _ s t a t u s " ,   l a m b d a :   _ E n t e r p r i s e S t a t u s ( ) ) 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s d k ` 
 
 
 
 t e s t s \ t e s t _ c l i _ p h a s e 1 1 _ m o d u l e . p y : 1 5 4 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s d k `   i n   l i e u   o f   a l i a s 
 
         | 
 
 1 5 2   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 1 5 3   |   )   - >   N o n e : 
 
 1 5 4   |           i m p o r t   s p a n f o r g e . s d k   a s   s d k 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 1 5 5   | 
 
 1 5 6   |           m o n k e y p a t c h . s e t a t t r ( s d k . s f _ e n t e r p r i s e ,   " g e t _ s t a t u s " ,   l a m b d a :   _ E n t e r p r i s e S t a t u s ( ) ) 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s d k ` 
 
 
 
 t e s t s \ t e s t _ c l i _ p h a s e 1 1 _ m o d u l e . p y : 1 6 9 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s d k `   i n   l i e u   o f   a l i a s 
 
         | 
 
 1 6 7   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 1 6 8   |   )   - >   N o n e : 
 
 1 6 9   |           i m p o r t   s p a n f o r g e . s d k   a s   s d k 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 1 7 0   | 
 
 1 7 1   |           m o n k e y p a t c h . s e t a t t r ( 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s d k ` 
 
 
 
 t e s t s \ t e s t _ c l i _ p h a s e 1 1 _ m o d u l e . p y : 1 9 5 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s d k `   i n   l i e u   o f   a l i a s 
 
         | 
 
 1 9 3   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 1 9 4   |   )   - >   N o n e : 
 
 1 9 5   |           i m p o r t   s p a n f o r g e . s d k   a s   s d k 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 1 9 6   | 
 
 1 9 7   |           m o n k e y p a t c h . s e t a t t r ( s d k . s f _ e n t e r p r i s e ,   " l i s t _ t e n a n t s " ,   l a m b d a :   [ ] ) 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s d k ` 
 
 
 
 t e s t s \ t e s t _ c l i _ p h a s e 1 1 _ m o d u l e . p y : 2 0 9 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s d k `   i n   l i e u   o f   a l i a s 
 
         | 
 
 2 0 7   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 2 0 8   |   )   - >   N o n e : 
 
 2 0 9   |           i m p o r t   s p a n f o r g e . s d k   a s   s d k 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 2 1 0   | 
 
 2 1 1   |           m o n k e y p a t c h . s e t a t t r ( 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s d k ` 
 
 
 
 t e s t s \ t e s t _ c l i _ p h a s e 1 1 _ m o d u l e . p y : 2 2 8 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s d k `   i n   l i e u   o f   a l i a s 
 
         | 
 
 2 2 6   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 2 2 7   |   )   - >   N o n e : 
 
 2 2 8   |           i m p o r t   s p a n f o r g e . s d k   a s   s d k 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 2 2 9   | 
 
 2 3 0   |           m o n k e y p a t c h . s e t a t t r ( s d k . s f _ e n t e r p r i s e ,   " g e t _ e n c r y p t i o n _ c o n f i g " ,   l a m b d a :   _ E n c r y p t i o n C o n f i g ( ) ) 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s d k ` 
 
 
 
 t e s t s \ t e s t _ c l i _ p h a s e 1 1 _ m o d u l e . p y : 2 4 3 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s d k `   i n   l i e u   o f   a l i a s 
 
         | 
 
 2 4 1   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 2 4 2   |   )   - >   N o n e : 
 
 2 4 3   |           i m p o r t   s p a n f o r g e . s d k   a s   s d k 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 2 4 4   | 
 
 2 4 5   |           m o n k e y p a t c h . s e t a t t r ( 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s d k ` 
 
 
 
 t e s t s \ t e s t _ c l i _ p h a s e 1 1 _ m o d u l e . p y : 2 6 6 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s d k `   i n   l i e u   o f   a l i a s 
 
         | 
 
 2 6 4   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 2 6 5   |   )   - >   N o n e : 
 
 2 6 6   |           i m p o r t   s p a n f o r g e . s d k   a s   s d k 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 2 6 7   | 
 
 2 6 8   |           m o n k e y p a t c h . s e t a t t r ( 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s d k ` 
 
 
 
 t e s t s \ t e s t _ c l i _ p h a s e 1 1 _ m o d u l e . p y : 2 8 5 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s d k `   i n   l i e u   o f   a l i a s 
 
         | 
 
 2 8 3   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 2 8 4   |   )   - >   N o n e : 
 
 2 8 5   |           i m p o r t   s p a n f o r g e . s d k   a s   s d k 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 2 8 6   | 
 
 2 8 7   |           m o n k e y p a t c h . s e t a t t r ( 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s d k ` 
 
 
 
 t e s t s \ t e s t _ c l i _ p h a s e 1 1 _ m o d u l e . p y : 3 0 8 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s d k `   i n   l i e u   o f   a l i a s 
 
         | 
 
 3 0 6   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 3 0 7   |   )   - >   N o n e : 
 
 3 0 8   |           i m p o r t   s p a n f o r g e . s d k   a s   s d k 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 3 0 9   | 
 
 3 1 0   |           m o n k e y p a t c h . s e t a t t r ( 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s d k ` 
 
 
 
 t e s t s \ t e s t _ c l i _ p h a s e 1 1 _ m o d u l e . p y : 3 3 0 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s d k `   i n   l i e u   o f   a l i a s 
 
         | 
 
 3 2 8   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 3 2 9   |   )   - >   N o n e : 
 
 3 3 0   |           i m p o r t   s p a n f o r g e . s d k   a s   s d k 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 3 3 1   | 
 
 3 3 2   |           m o n k e y p a t c h . s e t a t t r ( 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s d k ` 
 
 
 
 t e s t s \ t e s t _ c l i _ p h a s e 1 1 _ m o d u l e . p y : 3 5 8 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s d k `   i n   l i e u   o f   a l i a s 
 
         | 
 
 3 5 6   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 3 5 7   |   )   - >   N o n e : 
 
 3 5 8   |           i m p o r t   s p a n f o r g e . s d k   a s   s d k 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 3 5 9   | 
 
 3 6 0   |           m o n k e y p a t c h . s e t a t t r ( 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s d k ` 
 
 
 
 t e s t s \ t e s t _ c l i _ p h a s e 1 1 _ m o d u l e . p y : 3 8 5 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s d k `   i n   l i e u   o f   a l i a s 
 
         | 
 
 3 8 3   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 3 8 4   |   )   - >   N o n e : 
 
 3 8 5   |           i m p o r t   s p a n f o r g e . s d k   a s   s d k 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 3 8 6   | 
 
 3 8 7   |           m o n k e y p a t c h . s e t a t t r ( 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s d k ` 
 
 
 
 t e s t s \ t e s t _ c l i _ p h a s e 1 1 _ m o d u l e . p y : 4 1 0 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s d k `   i n   l i e u   o f   a l i a s 
 
         | 
 
 4 0 8   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 4 0 9   |   )   - >   N o n e : 
 
 4 1 0   |           i m p o r t   s p a n f o r g e . s d k   a s   s d k 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 4 1 1   | 
 
 4 1 2   |           m o n k e y p a t c h . s e t a t t r ( 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s d k ` 
 
 
 
 t e s t s \ t e s t _ c l i _ p h a s e 1 1 _ m o d u l e . p y : 4 5 2 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s d k `   i n   l i e u   o f   a l i a s 
 
         | 
 
 4 5 0   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 4 5 1   |   )   - >   N o n e : 
 
 4 5 2   |           i m p o r t   s p a n f o r g e . s d k   a s   s d k 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 4 5 3   | 
 
 4 5 4   |           l o g _ f i l e   =   t m p _ p a t h   /   " a p p . l o g " 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s d k ` 
 
 
 
 t e s t s \ t e s t _ c l i _ p h a s e 1 1 _ m o d u l e . p y : 4 6 9 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s d k `   i n   l i e u   o f   a l i a s 
 
         | 
 
 4 6 7   |           c a p s y s :   p y t e s t . C a p t u r e F i x t u r e [ s t r ] , 
 
 4 6 8   |   )   - >   N o n e : 
 
 4 6 9   |           i m p o r t   s p a n f o r g e . s d k   a s   s d k 
 
         |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 4 7 0   | 
 
 4 7 1   |           l o g _ f i l e   =   t m p _ p a t h   /   " a p p . l o g " 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s d k ` 
 
 
 
 t e s t s \ t e s t _ c o m p l i a n c e _ m a p p i n g . p y : 1 0 2 6 : 1 6 :   C 4 1 6   U n n e c e s s a r y   d i c t   c o m p r e h e n s i o n   ( r e w r i t e   u s i n g   ` d i c t ( ) ` ) 
 
           | 
 
 1 0 2 5   |                   a r g s   =   a r g p a r s e . N a m e s p a c e ( f r a m e w o r k = f r a m e w o r k ) 
 
 1 0 2 6   |                   _ e n v   =   { k :   v   f o r   k ,   v   i n   ( e n v   o r   { } ) . i t e m s ( ) } 
 
           |                                 ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   C 4 1 6 
 
 1 0 2 7   |                   w i t h   p a t c h . d i c t ( o s . e n v i r o n ,   _ e n v ,   c l e a r = F a l s e ) : 
 
 1 0 2 8   |                           r e t u r n   c m d _ r e a d i n e s s ( a r g s ) 
 
           | 
 
           =   h e l p :   R e w r i t e   u s i n g   ` d i c t ( ) ` 
 
 
 
 t e s t s \ t e s t _ c o v e r a g e _ g a p s . p y : 1 3 : 8 :   F 4 0 1   [ * ]   ` t h r e a d i n g `   i m p o r t e d   b u t   u n u s e d 
 
       | 
 
 1 2   |   i m p o r t   j s o n 
 
 1 3   |   i m p o r t   t h r e a d i n g 
 
       |                 ^ ^ ^ ^ ^ ^ ^ ^ ^   F 4 0 1 
 
 1 4   |   f r o m   p a t h l i b   i m p o r t   P a t h 
 
 1 5   |   f r o m   t y p i n g   i m p o r t   A n y 
 
       | 
 
       =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` t h r e a d i n g ` 
 
 
 
 t e s t s \ t e s t _ c o v e r a g e _ g a p s . p y : 1 4 : 2 1 :   T C 0 0 3   M o v e   s t a n d a r d   l i b r a r y   i m p o r t   ` p a t h l i b . P a t h `   i n t o   a   t y p e - c h e c k i n g   b l o c k 
 
       | 
 
 1 2   |   i m p o r t   j s o n 
 
 1 3   |   i m p o r t   t h r e a d i n g 
 
 1 4   |   f r o m   p a t h l i b   i m p o r t   P a t h 
 
       |                                           ^ ^ ^ ^   T C 0 0 3 
 
 1 5   |   f r o m   t y p i n g   i m p o r t   A n y 
 
 1 6   |   f r o m   u n i t t e s t . m o c k   i m p o r t   M a g i c M o c k ,   p a t c h 
 
       | 
 
       =   h e l p :   M o v e   i n t o   t y p e - c h e c k i n g   b l o c k 
 
 
 
 t e s t s \ t e s t _ c o v e r a g e _ g a p s . p y : 1 5 : 2 0 :   F 4 0 1   [ * ]   ` t y p i n g . A n y `   i m p o r t e d   b u t   u n u s e d 
 
       | 
 
 1 3   |   i m p o r t   t h r e a d i n g 
 
 1 4   |   f r o m   p a t h l i b   i m p o r t   P a t h 
 
 1 5   |   f r o m   t y p i n g   i m p o r t   A n y 
 
       |                                         ^ ^ ^   F 4 0 1 
 
 1 6   |   f r o m   u n i t t e s t . m o c k   i m p o r t   M a g i c M o c k ,   p a t c h 
 
       | 
 
       =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` t y p i n g . A n y ` 
 
 
 
 t e s t s \ t e s t _ d a t a s e t _ s c a n n e r . p y : 8 : 1 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
       | 
 
   6   |       " " " 
 
   7   | 
 
   8   |   /   f r o m   _ _ f u t u r e _ _   i m p o r t   a n n o t a t i o n s 
 
   9   |   | 
 
 1 0   |   |   i m p o r t   j s o n 
 
 1 1   |   |   i m p o r t   t e x t w r a p 
 
 1 2   |   |   f r o m   p a t h l i b   i m p o r t   P a t h 
 
 1 3   |   | 
 
 1 4   |   |   i m p o r t   p y t e s t 
 
 1 5   |   | 
 
 1 6   |   |   f r o m   s p a n f o r g e . v a l i d a t e   i m p o r t   ( 
 
 1 7   |   |           D a t a s e t S c a n F i n d i n g , 
 
 1 8   |   |           D a t a s e t S c a n R e p o r t , 
 
 1 9   |   |           s c a n _ d a t a s e t , 
 
 2 0   |   |   ) 
 
       |   | _ ^   I 0 0 1 
 
       | 
 
       =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ d a t a s e t _ s c a n n e r . p y : 1 1 : 8 :   F 4 0 1   [ * ]   ` t e x t w r a p `   i m p o r t e d   b u t   u n u s e d 
 
       | 
 
 1 0   |   i m p o r t   j s o n 
 
 1 1   |   i m p o r t   t e x t w r a p 
 
       |                 ^ ^ ^ ^ ^ ^ ^ ^   F 4 0 1 
 
 1 2   |   f r o m   p a t h l i b   i m p o r t   P a t h 
 
       | 
 
       =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` t e x t w r a p ` 
 
 
 
 t e s t s \ t e s t _ d a t a s e t _ s c a n n e r . p y : 1 2 : 2 1 :   T C 0 0 3   M o v e   s t a n d a r d   l i b r a r y   i m p o r t   ` p a t h l i b . P a t h `   i n t o   a   t y p e - c h e c k i n g   b l o c k 
 
       | 
 
 1 0   |   i m p o r t   j s o n 
 
 1 1   |   i m p o r t   t e x t w r a p 
 
 1 2   |   f r o m   p a t h l i b   i m p o r t   P a t h 
 
       |                                           ^ ^ ^ ^   T C 0 0 3 
 
 1 3   | 
 
 1 4   |   i m p o r t   p y t e s t 
 
       | 
 
       =   h e l p :   M o v e   i n t o   t y p e - c h e c k i n g   b l o c k 
 
 
 
 t e s t s \ t e s t _ d a t a s e t _ s c a n n e r . p y : 1 4 : 8 :   F 4 0 1   [ * ]   ` p y t e s t `   i m p o r t e d   b u t   u n u s e d 
 
       | 
 
 1 2   |   f r o m   p a t h l i b   i m p o r t   P a t h 
 
 1 3   | 
 
 1 4   |   i m p o r t   p y t e s t 
 
       |                 ^ ^ ^ ^ ^ ^   F 4 0 1 
 
 1 5   | 
 
 1 6   |   f r o m   s p a n f o r g e . v a l i d a t e   i m p o r t   ( 
 
       | 
 
       =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` p y t e s t ` 
 
 
 
 t e s t s \ t e s t _ d a t a s e t _ s c a n n e r . p y : 1 7 : 5 :   F 4 0 1   [ * ]   ` s p a n f o r g e . v a l i d a t e . D a t a s e t S c a n F i n d i n g `   i m p o r t e d   b u t   u n u s e d 
 
       | 
 
 1 6   |   f r o m   s p a n f o r g e . v a l i d a t e   i m p o r t   ( 
 
 1 7   |           D a t a s e t S c a n F i n d i n g , 
 
       |           ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   F 4 0 1 
 
 1 8   |           D a t a s e t S c a n R e p o r t , 
 
 1 9   |           s c a n _ d a t a s e t , 
 
       | 
 
       =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` s p a n f o r g e . v a l i d a t e . D a t a s e t S c a n F i n d i n g ` 
 
 
 
 t e s t s \ t e s t _ d a t a s e t _ s c a n n e r . p y : 1 3 5 : 1 2 :   F 4 0 1   [ * ]   ` s y s `   i m p o r t e d   b u t   u n u s e d 
 
         | 
 
 1 3 3   |           " " " R u n   t h e   s p a n f o r g e   C L I   m a i n ( )   w i t h   g i v e n   a r g s   a n d   c a p t u r e   s t d o u t . " " " 
 
 1 3 4   |           i m p o r t   i o 
 
 1 3 5   |           i m p o r t   s y s 
 
         |                         ^ ^ ^   F 4 0 1 
 
 1 3 6   |           f r o m   u n i t t e s t . m o c k   i m p o r t   p a t c h 
 
         | 
 
         =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` s y s ` 
 
 
 
 t e s t s \ t e s t _ d a t a s e t _ s c a n n e r . p y : 1 9 6 : 1 6 :   F 4 0 1   [ * ]   ` s y s `   i m p o r t e d   b u t   u n u s e d 
 
         | 
 
 1 9 4   |           d e f   t e s t _ m i s s i n g _ d a t a s e t _ f i l e _ r e t u r n s _ 2 ( s e l f ,   t m p _ p a t h :   P a t h )   - >   N o n e : 
 
 1 9 5   |                   i m p o r t   i o 
 
 1 9 6   |                   i m p o r t   s y s 
 
         |                                 ^ ^ ^   F 4 0 1 
 
 1 9 7   |                   f r o m   u n i t t e s t . m o c k   i m p o r t   p a t c h 
 
         | 
 
         =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` s y s ` 
 
 
 
 t e s t s \ t e s t _ d e p r e c a t i o n s . p y : 3 : 1 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
       | 
 
   1   |       " " " T e s t s   f o r   s p a n f o r g e . d e p r e c a t i o n s       D e p r e c a t i o n R e g i s t r y ,   n o t i c e s ,   h e l p e r s . " " " 
 
   2   | 
 
   3   |   /   f r o m   _ _ f u t u r e _ _   i m p o r t   a n n o t a t i o n s 
 
   4   |   | 
 
   5   |   |   i m p o r t   t h r e a d i n g 
 
   6   |   |   i m p o r t   w a r n i n g s 
 
   7   |   | 
 
   8   |   |   i m p o r t   p y t e s t 
 
   9   |   | 
 
 1 0   |   |   i m p o r t   s p a n f o r g e . d e p r e c a t i o n s   a s   d e p _ m o d u l e 
 
 1 1   |   |   f r o m   s p a n f o r g e . d e p r e c a t i o n s   i m p o r t   ( 
 
 1 2   |   |           D e p r e c a t i o n N o t i c e , 
 
 1 3   |   |           D e p r e c a t i o n R e g i s t r y , 
 
 1 4   |   |           g e t _ d e p r e c a t i o n _ n o t i c e , 
 
 1 5   |   |           g e t _ r e g i s t r y , 
 
 1 6   |   |           l i s t _ d e p r e c a t e d , 
 
 1 7   |   |           m a r k _ d e p r e c a t e d , 
 
 1 8   |   |           w a r n _ i f _ d e p r e c a t e d , 
 
 1 9   |   |   ) 
 
       |   | _ ^   I 0 0 1 
 
       | 
 
       =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ e 2 e _ c l i . p y : 1 3 : 8 :   F 4 0 1   [ * ]   ` s y s `   i m p o r t e d   b u t   u n u s e d 
 
       | 
 
 1 1   |   i m p o r t   i o 
 
 1 2   |   i m p o r t   j s o n 
 
 1 3   |   i m p o r t   s y s 
 
       |                 ^ ^ ^   F 4 0 1 
 
 1 4   |   i m p o r t   t e x t w r a p 
 
 1 5   |   f r o m   p a t h l i b   i m p o r t   P a t h 
 
       | 
 
       =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` s y s ` 
 
 
 
 t e s t s \ t e s t _ e 2 e _ c l i . p y : 1 4 : 8 :   F 4 0 1   [ * ]   ` t e x t w r a p `   i m p o r t e d   b u t   u n u s e d 
 
       | 
 
 1 2   |   i m p o r t   j s o n 
 
 1 3   |   i m p o r t   s y s 
 
 1 4   |   i m p o r t   t e x t w r a p 
 
       |                 ^ ^ ^ ^ ^ ^ ^ ^   F 4 0 1 
 
 1 5   |   f r o m   p a t h l i b   i m p o r t   P a t h 
 
 1 6   |   f r o m   t y p i n g   i m p o r t   S e q u e n c e 
 
       | 
 
       =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` t e x t w r a p ` 
 
 
 
 t e s t s \ t e s t _ e 2 e _ c l i . p y : 1 5 : 2 1 :   T C 0 0 3   M o v e   s t a n d a r d   l i b r a r y   i m p o r t   ` p a t h l i b . P a t h `   i n t o   a   t y p e - c h e c k i n g   b l o c k 
 
       | 
 
 1 3   |   i m p o r t   s y s 
 
 1 4   |   i m p o r t   t e x t w r a p 
 
 1 5   |   f r o m   p a t h l i b   i m p o r t   P a t h 
 
       |                                           ^ ^ ^ ^   T C 0 0 3 
 
 1 6   |   f r o m   t y p i n g   i m p o r t   S e q u e n c e 
 
 1 7   |   f r o m   u n i t t e s t . m o c k   i m p o r t   p a t c h 
 
       | 
 
       =   h e l p :   M o v e   i n t o   t y p e - c h e c k i n g   b l o c k 
 
 
 
 t e s t s \ t e s t _ e 2 e _ c l i . p y : 1 6 : 1 :   U P 0 3 5   [ * ]   I m p o r t   f r o m   ` c o l l e c t i o n s . a b c `   i n s t e a d :   ` S e q u e n c e ` 
 
       | 
 
 1 4   |   i m p o r t   t e x t w r a p 
 
 1 5   |   f r o m   p a t h l i b   i m p o r t   P a t h 
 
 1 6   |   f r o m   t y p i n g   i m p o r t   S e q u e n c e 
 
       |   ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   U P 0 3 5 
 
 1 7   |   f r o m   u n i t t e s t . m o c k   i m p o r t   p a t c h 
 
       | 
 
       =   h e l p :   I m p o r t   f r o m   ` c o l l e c t i o n s . a b c ` 
 
 
 
 t e s t s \ t e s t _ e 2 e _ c l i . p y : 1 6 : 2 0 :   F 4 0 1   [ * ]   ` t y p i n g . S e q u e n c e `   i m p o r t e d   b u t   u n u s e d 
 
       | 
 
 1 4   |   i m p o r t   t e x t w r a p 
 
 1 5   |   f r o m   p a t h l i b   i m p o r t   P a t h 
 
 1 6   |   f r o m   t y p i n g   i m p o r t   S e q u e n c e 
 
       |                                         ^ ^ ^ ^ ^ ^ ^ ^   F 4 0 1 
 
 1 7   |   f r o m   u n i t t e s t . m o c k   i m p o r t   p a t c h 
 
       | 
 
       =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` t y p i n g . S e q u e n c e ` 
 
 
 
 t e s t s \ t e s t _ e 2 e _ c l i . p y : 1 0 5 : 2 4 :   E 7 4 1   A m b i g u o u s   v a r i a b l e   n a m e :   ` l ` 
 
         | 
 
 1 0 3   |                   ) 
 
 1 0 4   |                   a s s e r t   r c   = =   0 
 
 1 0 5   |                   l i n e s   =   [ l   f o r   l   i n   o u t _ f i l e . r e a d _ t e x t ( ) . s p l i t l i n e s ( )   i f   l . s t r i p ( ) ] 
 
         |                                                 ^   E 7 4 1 
 
 1 0 6   |                   a s s e r t   l e n ( l i n e s )   = =   5 
 
         | 
 
 
 
 t e s t s \ t e s t _ e 2 e _ c l i . p y : 3 6 2 : 2 4 :   E 7 4 1   A m b i g u o u s   v a r i a b l e   n a m e :   ` l ` 
 
         | 
 
 3 6 0   |                   r c ,   o u t   =   _ r u n _ c l i ( " m i g r a t e " ,   s t r ( s r c ) ,   " - - o u t p u t " ,   s t r ( d s t ) ) 
 
 3 6 1   |                   a s s e r t   r c   = =   0 
 
 3 6 2   |                   l i n e s   =   [ l   f o r   l   i n   d s t . r e a d _ t e x t ( ) . s p l i t l i n e s ( )   i f   l . s t r i p ( ) ] 
 
         |                                                 ^   E 7 4 1 
 
 3 6 3   |                   a s s e r t   l e n ( l i n e s )   > =   1 
 
 3 6 4   |                   r e s u l t   =   j s o n . l o a d s ( l i n e s [ 0 ] ) 
 
         | 
 
 
 
 t e s t s \ t e s t _ e 2 e _ c l i . p y : 7 5 8 : 2 4 :   E 7 4 1   A m b i g u o u s   v a r i a b l e   n a m e :   ` l ` 
 
         | 
 
 7 5 6   |                   o u t _ f i l e   =   t m p _ p a t h   /   " e v a l _ d a t a s e t . j s o n l " 
 
 7 5 7   |                   _ r u n _ c l i ( " e v a l " ,   " s a v e " ,   " - - i n p u t " ,   s t r ( s r c ) ,   " - - o u t p u t " ,   s t r ( o u t _ f i l e ) ) 
 
 7 5 8   |                   l i n e s   =   [ l   f o r   l   i n   o u t _ f i l e . r e a d _ t e x t ( ) . s p l i t l i n e s ( )   i f   l . s t r i p ( ) ] 
 
         |                                                 ^   E 7 4 1 
 
 7 5 9   |                   a s s e r t   l e n ( l i n e s )   = =   1 
 
 7 6 0   |                   e x a m p l e   =   j s o n . l o a d s ( l i n e s [ 0 ] ) 
 
         | 
 
 
 
 t e s t s \ t e s t _ e 2 e _ c l i . p y : 9 1 9 : 2 4 :   E 7 4 1   A m b i g u o u s   v a r i a b l e   n a m e :   ` l ` 
 
         | 
 
 9 1 7   |                   a s s e r t   r c   = =   0 
 
 9 1 8   |                   a s s e r t   e v e n t s _ f i l e . e x i s t s ( ) 
 
 9 1 9   |                   l i n e s   =   [ l   f o r   l   i n   e v e n t s _ f i l e . r e a d _ t e x t ( ) . s p l i t l i n e s ( )   i f   l . s t r i p ( ) ] 
 
         |                                                 ^   E 7 4 1 
 
 9 2 0   |                   a s s e r t   l e n ( l i n e s )   = =   1 0 
 
         | 
 
 
 
 t e s t s \ t e s t _ e g r e s s _ a n d _ n o r m a l i z e r . p y : 1 4 : 5 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
       | 
 
 1 3   |       d e f   t e s t _ c h e c k _ e g r e s s _ b l o c k s _ w h e n _ n o _ e g r e s s _ e n a b l e d ( m o n k e y p a t c h :   p y t e s t . M o n k e y P a t c h )   - >   N o n e : 
 
 1 4   |   /           i m p o r t   s p a n f o r g e . e g r e s s   a s   e g r e s s 
 
 1 5   |   |           i m p o r t   s p a n f o r g e . c o n f i g   a s   c o n f i g 
 
       |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   I 0 0 1 
 
 1 6   | 
 
 1 7   |               m o n k e y p a t c h . s e t a t t r ( 
 
       | 
 
       =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ e g r e s s _ a n d _ n o r m a l i z e r . p y : 1 4 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   e g r e s s `   i n   l i e u   o f   a l i a s 
 
       | 
 
 1 3   |   d e f   t e s t _ c h e c k _ e g r e s s _ b l o c k s _ w h e n _ n o _ e g r e s s _ e n a b l e d ( m o n k e y p a t c h :   p y t e s t . M o n k e y P a t c h )   - >   N o n e : 
 
 1 4   |           i m p o r t   s p a n f o r g e . e g r e s s   a s   e g r e s s 
 
       |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 1 5   |           i m p o r t   s p a n f o r g e . c o n f i g   a s   c o n f i g 
 
       | 
 
       =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   e g r e s s ` 
 
 
 
 t e s t s \ t e s t _ e g r e s s _ a n d _ n o r m a l i z e r . p y : 1 5 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   c o n f i g `   i n   l i e u   o f   a l i a s 
 
       | 
 
 1 3   |   d e f   t e s t _ c h e c k _ e g r e s s _ b l o c k s _ w h e n _ n o _ e g r e s s _ e n a b l e d ( m o n k e y p a t c h :   p y t e s t . M o n k e y P a t c h )   - >   N o n e : 
 
 1 4   |           i m p o r t   s p a n f o r g e . e g r e s s   a s   e g r e s s 
 
 1 5   |           i m p o r t   s p a n f o r g e . c o n f i g   a s   c o n f i g 
 
       |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 1 6   | 
 
 1 7   |           m o n k e y p a t c h . s e t a t t r ( 
 
       | 
 
       =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   c o n f i g ` 
 
 
 
 t e s t s \ t e s t _ e g r e s s _ a n d _ n o r m a l i z e r . p y : 2 8 : 5 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
       | 
 
 2 7   |       d e f   t e s t _ c h e c k _ e g r e s s _ a l l o w s _ m a t c h i n g _ p r e f i x ( m o n k e y p a t c h :   p y t e s t . M o n k e y P a t c h )   - >   N o n e : 
 
 2 8   |   /           i m p o r t   s p a n f o r g e . e g r e s s   a s   e g r e s s 
 
 2 9   |   |           i m p o r t   s p a n f o r g e . c o n f i g   a s   c o n f i g 
 
       |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   I 0 0 1 
 
 3 0   | 
 
 3 1   |               m o n k e y p a t c h . s e t a t t r ( 
 
       | 
 
       =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ e g r e s s _ a n d _ n o r m a l i z e r . p y : 2 8 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   e g r e s s `   i n   l i e u   o f   a l i a s 
 
       | 
 
 2 7   |   d e f   t e s t _ c h e c k _ e g r e s s _ a l l o w s _ m a t c h i n g _ p r e f i x ( m o n k e y p a t c h :   p y t e s t . M o n k e y P a t c h )   - >   N o n e : 
 
 2 8   |           i m p o r t   s p a n f o r g e . e g r e s s   a s   e g r e s s 
 
       |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 2 9   |           i m p o r t   s p a n f o r g e . c o n f i g   a s   c o n f i g 
 
       | 
 
       =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   e g r e s s ` 
 
 
 
 t e s t s \ t e s t _ e g r e s s _ a n d _ n o r m a l i z e r . p y : 2 9 : 1 2 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   c o n f i g `   i n   l i e u   o f   a l i a s 
 
       | 
 
 2 7   |   d e f   t e s t _ c h e c k _ e g r e s s _ a l l o w s _ m a t c h i n g _ p r e f i x ( m o n k e y p a t c h :   p y t e s t . M o n k e y P a t c h )   - >   N o n e : 
 
 2 8   |           i m p o r t   s p a n f o r g e . e g r e s s   a s   e g r e s s 
 
 2 9   |           i m p o r t   s p a n f o r g e . c o n f i g   a s   c o n f i g 
 
       |                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 3 0   | 
 
 3 1   |           m o n k e y p a t c h . s e t a t t r ( 
 
       | 
 
       =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   c o n f i g ` 
 
 
 
 t e s t s \ t e s t _ e x p o r t _ s i e m _ s p l u n k . p y : 8 : 1 6 :   F 4 0 1   [ * ]   ` i o . B y t e s I O `   i m p o r t e d   b u t   u n u s e d 
 
       | 
 
   6   |   i m p o r t   u r l l i b . e r r o r 
 
   7   |   i m p o r t   u r l l i b . r e q u e s t 
 
   8   |   f r o m   i o   i m p o r t   B y t e s I O 
 
       |                                 ^ ^ ^ ^ ^ ^ ^   F 4 0 1 
 
   9   |   f r o m   t y p i n g   i m p o r t   A n y 
 
 1 0   |   f r o m   u n i t t e s t . m o c k   i m p o r t   M a g i c M o c k ,   p a t c h 
 
       | 
 
       =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` i o . B y t e s I O ` 
 
 
 
 t e s t s \ t e s t _ e x p o r t _ s i e m _ s p l u n k . p y : 2 5 : 1 6 :   C 4 0 8   U n n e c e s s a r y   ` d i c t ( ) `   c a l l   ( r e w r i t e   a s   a   l i t e r a l ) 
 
       | 
 
 2 4   |   d e f   _ m a k e _ e x p o r t e r ( * * k w a r g s :   A n y )   - >   S p l u n k H E C E x p o r t e r : 
 
 2 5   |           d e f a u l t s   =   d i c t ( h e c _ u r l = _ U R L ,   t o k e n = _ T O K E N ,   b a t c h _ s i z e = 1 0 ) 
 
       |                                 ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   C 4 0 8 
 
 2 6   |           d e f a u l t s . u p d a t e ( k w a r g s ) 
 
 2 7   |           r e t u r n   S p l u n k H E C E x p o r t e r ( * * d e f a u l t s ) 
 
       | 
 
       =   h e l p :   R e w r i t e   a s   a   l i t e r a l 
 
 
 
 t e s t s \ t e s t _ e x p o r t _ s i e m _ s p l u n k . p y : 3 3 3 : 8 4 :   F 8 4 1   L o c a l   v a r i a b l e   ` m o c k _ o p e n `   i s   a s s i g n e d   t o   b u t   n e v e r   u s e d 
 
         | 
 
 3 3 1   |           d e f   t e s t _ c o n t e x t _ m a n a g e r _ f l u s h e s _ o n _ e x i t ( s e l f )   - >   N o n e : 
 
 3 3 2   |                   e v   =   _ f a k e _ e v e n t ( ) 
 
 3 3 3   |                   w i t h   p a t c h ( " u r l l i b . r e q u e s t . u r l o p e n " ,   r e t u r n _ v a l u e = _ m o c k _ 2 0 0 _ r e s p o n s e ( ) )   a s   m o c k _ o p e n : 
 
         |                                                                                                                                                                         ^ ^ ^ ^ ^ ^ ^ ^ ^   F 8 4 1 
 
 3 3 4   |                           w i t h   _ m a k e _ e x p o r t e r ( b a t c h _ s i z e = 1 0 0 )   a s   e x p : 
 
 3 3 5   |                                   e x p . e x p o r t ( e v ) 
 
         | 
 
         =   h e l p :   R e m o v e   a s s i g n m e n t   t o   u n u s e d   v a r i a b l e   ` m o c k _ o p e n ` 
 
 
 
 t e s t s \ t e s t _ e x p o r t _ s i e m _ s y s l o g . p y : 3 : 1 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
       | 
 
   1   |       " " " T e s t s   f o r   s p a n f o r g e . e x p o r t . s i e m _ s y s l o g       S y s l o g E x p o r t e r . " " " 
 
   2   | 
 
   3   |   /   f r o m   _ _ f u t u r e _ _   i m p o r t   a n n o t a t i o n s 
 
   4   |   | 
 
   5   |   |   i m p o r t   r e 
 
   6   |   |   i m p o r t   s o c k e t 
 
   7   |   |   f r o m   t y p i n g   i m p o r t   A n y 
 
   8   |   |   f r o m   u n i t t e s t . m o c k   i m p o r t   M a g i c M o c k ,   c a l l ,   p a t c h 
 
   9   |   | 
 
 1 0   |   |   i m p o r t   p y t e s t 
 
 1 1   |   | 
 
 1 2   |   |   f r o m   s p a n f o r g e . e x p o r t . s i e m _ s y s l o g   i m p o r t   ( 
 
 1 3   |   |           S y s l o g E x p o r t e r , 
 
 1 4   |   |           S y s l o g E x p o r t e r E r r o r , 
 
 1 5   |   |           _ C E F _ E S C A P E _ R E , 
 
 1 6   |   |           _ S E V E R I T Y _ M A P , 
 
 1 7   |   |   ) 
 
       |   | _ ^   I 0 0 1 
 
 1 8   | 
 
 1 9   |       #   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
       | 
 
       =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ e x p o r t _ s i e m _ s y s l o g . p y : 6 : 8 :   F 4 0 1   [ * ]   ` s o c k e t `   i m p o r t e d   b u t   u n u s e d 
 
     | 
 
 5   |   i m p o r t   r e 
 
 6   |   i m p o r t   s o c k e t 
 
     |                 ^ ^ ^ ^ ^ ^   F 4 0 1 
 
 7   |   f r o m   t y p i n g   i m p o r t   A n y 
 
 8   |   f r o m   u n i t t e s t . m o c k   i m p o r t   M a g i c M o c k ,   c a l l ,   p a t c h 
 
     | 
 
     =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` s o c k e t ` 
 
 
 
 t e s t s \ t e s t _ e x p o r t _ s i e m _ s y s l o g . p y : 8 : 3 8 :   F 4 0 1   [ * ]   ` u n i t t e s t . m o c k . c a l l `   i m p o r t e d   b u t   u n u s e d 
 
       | 
 
   6   |   i m p o r t   s o c k e t 
 
   7   |   f r o m   t y p i n g   i m p o r t   A n y 
 
   8   |   f r o m   u n i t t e s t . m o c k   i m p o r t   M a g i c M o c k ,   c a l l ,   p a t c h 
 
       |                                                                             ^ ^ ^ ^   F 4 0 1 
 
   9   | 
 
 1 0   |   i m p o r t   p y t e s t 
 
       | 
 
       =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` u n i t t e s t . m o c k . c a l l ` 
 
 
 
 t e s t s \ t e s t _ e x p o r t _ s i e m _ s y s l o g . p y : 2 7 : 1 6 :   C 4 0 8   U n n e c e s s a r y   ` d i c t ( ) `   c a l l   ( r e w r i t e   a s   a   l i t e r a l ) 
 
       | 
 
 2 6   |   d e f   _ m a k e _ e x p o r t e r ( * * k w a r g s :   A n y )   - >   S y s l o g E x p o r t e r : 
 
 2 7   |           d e f a u l t s   =   d i c t ( h o s t = _ H O S T ) 
 
       |                                 ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   C 4 0 8 
 
 2 8   |           d e f a u l t s . u p d a t e ( k w a r g s ) 
 
 2 9   |           r e t u r n   S y s l o g E x p o r t e r ( * * d e f a u l t s ) 
 
       | 
 
       =   h e l p :   R e w r i t e   a s   a   l i t e r a l 
 
 
 
 t e s t s \ t e s t _ f e e d b a c k . p y : 3 : 1 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
       | 
 
   1   |       " " " T e s t s   f o r   n a m e s p a c e s / f e e d b a c k . p y   a n d   s d k / f e e d b a c k . p y   ( F - 4 2 / F - 4 3 ) . " " " 
 
   2   | 
 
   3   |   /   f r o m   _ _ f u t u r e _ _   i m p o r t   a n n o t a t i o n s 
 
   4   |   | 
 
   5   |   |   i m p o r t   p y t e s t 
 
   6   |   | 
 
   7   |   |   f r o m   s p a n f o r g e . n a m e s p a c e s . f e e d b a c k   i m p o r t   ( 
 
   8   |   |           F e e d b a c k R a t i n g , 
 
   9   |   |           F e e d b a c k S u b m i t t e d P a y l o a d , 
 
 1 0   |   |           F e e d b a c k S u m m a r y P a y l o a d , 
 
 1 1   |   |   ) 
 
 1 2   |   |   f r o m   s p a n f o r g e . s d k . f e e d b a c k   i m p o r t   F e e d b a c k S t a t u s I n f o ,   S F F e e d b a c k C l i e n t 
 
 1 3   |   |   f r o m   s p a n f o r g e . s d k . _ b a s e   i m p o r t   S F C l i e n t C o n f i g 
 
 1 4   |   |   f r o m   s p a n f o r g e . s d k . _ t y p e s   i m p o r t   S e c r e t S t r 
 
       |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   I 0 0 1 
 
       | 
 
       =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ f r a m e w o r k _ m a p p e r . p y : 1 3 : 1 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
       | 
 
 1 1   |       " " " 
 
 1 2   | 
 
 1 3   |   /   f r o m   _ _ f u t u r e _ _   i m p o r t   a n n o t a t i o n s 
 
 1 4   |   | 
 
 1 5   |   |   i m p o r t   j s o n 
 
 1 6   |   |   i m p o r t   o s 
 
 1 7   |   |   i m p o r t   z i p f i l e 
 
 1 8   |   |   f r o m   p a t h l i b   i m p o r t   P a t h 
 
 1 9   |   | 
 
 2 0   |   |   i m p o r t   p y t e s t 
 
 2 1   |   | 
 
 2 2   |   |   f r o m   s p a n f o r g e . c o m p l i a n c e   i m p o r t   ( 
 
 2 3   |   |           C o m p l i a n c e F r a m e w o r k , 
 
 2 4   |   |           C o m p l i a n c e M a p p i n g E n g i n e , 
 
 2 5   |   |           E v i d e n c e M a p p i n g , 
 
 2 6   |   |           F r a m e w o r k M a p p e r , 
 
 2 7   |   |   ) 
 
 2 8   |   |   f r o m   s p a n f o r g e . c o r e . c o m p l i a n c e _ m a p p i n g   i m p o r t   ( 
 
 2 9   |   |           C l a u s e S t a t u s , 
 
 3 0   |   |           _ E V E N T _ T O _ F R A M E W O R K _ M A P , 
 
 3 1   |   |           _ F R A M E W O R K _ C L A U S E S , 
 
 3 2   |   |   ) 
 
       |   | _ ^   I 0 0 1 
 
 3 3   | 
 
 3 4   |       #   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
       | 
 
       =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ f r a m e w o r k _ m a p p e r . p y : 2 3 1 : 1 3 :   B 0 0 7   L o o p   c o n t r o l   v a r i a b l e   ` k e y `   n o t   u s e d   w i t h i n   l o o p   b o d y 
 
         | 
 
 2 2 9   |                   r e s u l t   =   m a p p e r . m a p _ e v e n t s _ b u l k ( e v e n t s ) 
 
 2 3 0   |                   a s s e r t   l e n ( r e s u l t )   = =   3 
 
 2 3 1   |                   f o r   k e y ,   m a p p i n g s   i n   r e s u l t . i t e m s ( ) : 
 
         |                           ^ ^ ^   B 0 0 7 
 
 2 3 2   |                           a s s e r t   i s i n s t a n c e ( m a p p i n g s ,   l i s t ) 
 
         | 
 
         =   h e l p :   R e n a m e   u n u s e d   ` k e y `   t o   ` _ k e y ` 
 
 
 
 t e s t s \ t e s t _ f r a m e w o r k _ m a p p e r . p y : 2 3 1 : 3 0 :   P E R F 1 0 2   W h e n   u s i n g   o n l y   t h e   v a l u e s   o f   a   d i c t   u s e   t h e   ` v a l u e s ( ) `   m e t h o d 
 
         | 
 
 2 2 9   |                   r e s u l t   =   m a p p e r . m a p _ e v e n t s _ b u l k ( e v e n t s ) 
 
 2 3 0   |                   a s s e r t   l e n ( r e s u l t )   = =   3 
 
 2 3 1   |                   f o r   k e y ,   m a p p i n g s   i n   r e s u l t . i t e m s ( ) : 
 
         |                                                             ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P E R F 1 0 2 
 
 2 3 2   |                           a s s e r t   i s i n s t a n c e ( m a p p i n g s ,   l i s t ) 
 
         | 
 
         =   h e l p :   R e p l a c e   ` . i t e m s ( ) `   w i t h   ` . v a l u e s ( ) ` 
 
 
 
 t e s t s \ t e s t _ g a t e _ d e e p . p y : 5 : 2 1 :   T C 0 0 3   M o v e   s t a n d a r d   l i b r a r y   i m p o r t   ` p a t h l i b . P a t h `   i n t o   a   t y p e - c h e c k i n g   b l o c k 
 
     | 
 
 3   |   f r o m   _ _ f u t u r e _ _   i m p o r t   a n n o t a t i o n s 
 
 4   | 
 
 5   |   f r o m   p a t h l i b   i m p o r t   P a t h 
 
     |                                           ^ ^ ^ ^   T C 0 0 3 
 
 6   |   f r o m   u n i t t e s t . m o c k   i m p o r t   p a t c h 
 
     | 
 
     =   h e l p :   M o v e   i n t o   t y p e - c h e c k i n g   b l o c k 
 
 
 
 t e s t s \ t e s t _ g o v e r n a n c e . p y : 3 : 1 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
       | 
 
   1   |       " " " T e s t s   f o r   s p a n f o r g e . g o v e r n a n c e       E v e n t G o v e r n a n c e P o l i c y ,   h e l p e r s ,   e r r o r s . " " " 
 
   2   | 
 
   3   |   /   f r o m   _ _ f u t u r e _ _   i m p o r t   a n n o t a t i o n s 
 
   4   |   | 
 
   5   |   |   i m p o r t   w a r n i n g s 
 
   6   |   |   f r o m   t y p i n g   i m p o r t   A n y 
 
   7   |   |   f r o m   u n i t t e s t . m o c k   i m p o r t   M a g i c M o c k 
 
   8   |   | 
 
   9   |   |   i m p o r t   p y t e s t 
 
 1 0   |   | 
 
 1 1   |   |   i m p o r t   s p a n f o r g e . g o v e r n a n c e   a s   g o v _ m o d u l e 
 
 1 2   |   |   f r o m   s p a n f o r g e . g o v e r n a n c e   i m p o r t   ( 
 
 1 3   |   |           E v e n t G o v e r n a n c e P o l i c y , 
 
 1 4   |   |           G o v e r n a n c e V i o l a t i o n E r r o r , 
 
 1 5   |   |           G o v e r n a n c e W a r n i n g , 
 
 1 6   |   |           c h e c k _ e v e n t , 
 
 1 7   |   |           g e t _ g l o b a l _ p o l i c y , 
 
 1 8   |   |           s e t _ g l o b a l _ p o l i c y , 
 
 1 9   |   |   ) 
 
       |   | _ ^   I 0 0 1 
 
       | 
 
       =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ g o v e r n a n c e . p y : 1 1 : 3 2 :   F 4 0 1   [ * ]   ` s p a n f o r g e . g o v e r n a n c e `   i m p o r t e d   b u t   u n u s e d 
 
       | 
 
   9   |   i m p o r t   p y t e s t 
 
 1 0   | 
 
 1 1   |   i m p o r t   s p a n f o r g e . g o v e r n a n c e   a s   g o v _ m o d u l e 
 
       |                                                                 ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   F 4 0 1 
 
 1 2   |   f r o m   s p a n f o r g e . g o v e r n a n c e   i m p o r t   ( 
 
 1 3   |           E v e n t G o v e r n a n c e P o l i c y , 
 
       | 
 
       =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` s p a n f o r g e . g o v e r n a n c e ` 
 
 
 
 t e s t s \ t e s t _ g o v e r n a n c e . p y : 7 3 : 1 3 :   B 0 2 8   N o   e x p l i c i t   ` s t a c k l e v e l `   k e y w o r d   a r g u m e n t   f o u n d 
 
       | 
 
 7 1   |                   w i t h   w a r n i n g s . c a t c h _ w a r n i n g s ( r e c o r d = T r u e )   a s   w : 
 
 7 2   |                           w a r n i n g s . s i m p l e f i l t e r ( " a l w a y s " ) 
 
 7 3   |                           w a r n i n g s . w a r n ( " t e s t " ,   G o v e r n a n c e W a r n i n g ) 
 
       |                           ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   B 0 2 8 
 
 7 4   |                   a s s e r t   l e n ( w )   = =   1 
 
 7 5   |                   a s s e r t   i s s u b c l a s s ( w [ 0 ] . c a t e g o r y ,   G o v e r n a n c e W a r n i n g ) 
 
       | 
 
       =   h e l p :   S e t   ` s t a c k l e v e l = 2 ` 
 
 
 
 t e s t s \ t e s t _ g o v e r n a n c e . p y : 2 4 6 : 9 :   F 8 4 1   L o c a l   v a r i a b l e   ` i s s u e d _ w a r n i n g s `   i s   a s s i g n e d   t o   b u t   n e v e r   u s e d 
 
         | 
 
 2 4 4   |           d e f   t e s t _ d e p r e c a t e d _ w a r n i n g _ b e f o r e _ c u s t o m _ r u l e s ( s e l f )   - >   N o n e : 
 
 2 4 5   |                   " " " D e p r e c a t e d   w a r n i n g   i s   i s s u e d   e v e n   w h e n   c u s t o m   r u l e s   w o u l d   a l s o   b l o c k . " " " 
 
 2 4 6   |                   i s s u e d _ w a r n i n g s :   l i s t [ A n y ]   =   [ ] 
 
         |                   ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   F 8 4 1 
 
 2 4 7   | 
 
 2 4 8   |                   d e f   b l o c k i n g _ r u l e ( e v :   A n y )   - >   s t r   |   N o n e : 
 
         | 
 
         =   h e l p :   R e m o v e   a s s i g n m e n t   t o   u n u s e d   v a r i a b l e   ` i s s u e d _ w a r n i n g s ` 
 
 
 
 t e s t s \ t e s t _ g o v e r n a n c e . p y : 2 7 4 : 2 6 :   R U F 0 1 5   P r e f e r   ` n e x t ( i t e r ( E v e n t T y p e ) ) `   o v e r   s i n g l e   e l e m e n t   s l i c e 
 
         | 
 
 2 7 2   |                   #   U s e   a   k n o w n   r e g i s t e r e d   e v e n t   t y p e 
 
 2 7 3   |                   f r o m   s p a n f o r g e   i m p o r t   E v e n t T y p e 
 
 2 7 4   |                   e v   =   _ m a k e _ e v e n t ( l i s t ( E v e n t T y p e ) [ 0 ] . v a l u e )     #   t y p e :   i g n o r e [ a t t r - d e f i n e d ] 
 
         |                                                     ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   R U F 0 1 5 
 
 2 7 5   |                   p o l i c y . c h e c k _ e v e n t ( e v )     #   s h o u l d   n o t   r a i s e 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` n e x t ( i t e r ( E v e n t T y p e ) ) ` 
 
 
 
 t e s t s \ t e s t _ l i n t . p y : 3 : 1 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
       | 
 
   1   |       " " " T e s t s   f o r   s p a n f o r g e . l i n t       r u n _ c h e c k s ( ) ,   L i n t E r r o r ,   A O - c o d e s ,   S p a n F o r g e C h e c k e r . " " " 
 
   2   | 
 
   3   |   /   f r o m   _ _ f u t u r e _ _   i m p o r t   a n n o t a t i o n s 
 
   4   |   | 
 
   5   |   |   i m p o r t   a s t 
 
   6   |   |   i m p o r t   t e x t w r a p 
 
   7   |   |   f r o m   p a t h l i b   i m p o r t   P a t h 
 
   8   |   | 
 
   9   |   |   i m p o r t   p y t e s t 
 
 1 0   |   | 
 
 1 1   |   |   f r o m   s p a n f o r g e . l i n t   i m p o r t   ( 
 
 1 2   |   |           L i n t E r r o r , 
 
 1 3   |   |           S p a n F o r g e C h e c k e r , 
 
 1 4   |   |           _ i t e r _ p y t h o n _ f i l e s , 
 
 1 5   |   |           r u n _ c h e c k s , 
 
 1 6   |   |   ) 
 
       |   | _ ^   I 0 0 1 
 
       | 
 
       =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ l i n t . p y : 7 : 2 1 :   T C 0 0 3   M o v e   s t a n d a r d   l i b r a r y   i m p o r t   ` p a t h l i b . P a t h `   i n t o   a   t y p e - c h e c k i n g   b l o c k 
 
     | 
 
 5   |   i m p o r t   a s t 
 
 6   |   i m p o r t   t e x t w r a p 
 
 7   |   f r o m   p a t h l i b   i m p o r t   P a t h 
 
     |                                           ^ ^ ^ ^   T C 0 0 3 
 
 8   | 
 
 9   |   i m p o r t   p y t e s t 
 
     | 
 
     =   h e l p :   M o v e   i n t o   t y p e - c h e c k i n g   b l o c k 
 
 
 
 t e s t s \ t e s t _ l i n t . p y : 1 2 6 : 9 :   F 8 4 1   L o c a l   v a r i a b l e   ` c o d e s `   i s   a s s i g n e d   t o   b u t   n e v e r   u s e d 
 
         | 
 
 1 2 4   |                   " " " ) 
 
 1 2 5   |                   e r r o r s   =   r u n _ c h e c k s ( s o u r c e ) 
 
 1 2 6   |                   c o d e s   =   _ c o d e s ( e r r o r s ) 
 
         |                   ^ ^ ^ ^ ^   F 8 4 1 
 
 1 2 7   |                   a o 0 0 1   =   [ e   f o r   e   i n   e r r o r s   i f   e . c o d e   = =   " A O 0 0 1 "   a n d   " e v e n t _ t y p e "   i n   e . m e s s a g e ] 
 
 1 2 8   |                   a s s e r t   l e n ( a o 0 0 1 )   > =   1 
 
         | 
 
         =   h e l p :   R e m o v e   a s s i g n m e n t   t o   u n u s e d   v a r i a b l e   ` c o d e s ` 
 
 
 
 t e s t s \ t e s t _ n e x t _ s d k _ f e a t u r e s . p y : 2 0 : 3 8 :   F 4 0 1   [ * ]   ` u n i t t e s t . m o c k . p a t c h `   i m p o r t e d   b u t   u n u s e d 
 
       | 
 
 1 8   |   f r o m   p a t h l i b   i m p o r t   P a t h 
 
 1 9   |   f r o m   t y p i n g   i m p o r t   A n y 
 
 2 0   |   f r o m   u n i t t e s t . m o c k   i m p o r t   M a g i c M o c k ,   p a t c h 
 
       |                                                                             ^ ^ ^ ^ ^   F 4 0 1 
 
 2 1   | 
 
 2 2   |   i m p o r t   p y t e s t 
 
       | 
 
       =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` u n i t t e s t . m o c k . p a t c h ` 
 
 
 
 t e s t s \ t e s t _ n e x t _ s d k _ f e a t u r e s . p y : 1 7 2 : 1 6 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s d k `   i n   l i e u   o f   a l i a s 
 
         | 
 
 1 7 1   |           d e f   t e s t _ e x p o r t e d _ f r o m _ s p a n f o r g e _ s d k ( s e l f )   - >   N o n e : 
 
 1 7 2   |                   i m p o r t   s p a n f o r g e . s d k   a s   s d k 
 
         |                                 ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 1 7 3   | 
 
 1 7 4   |                   a s s e r t   h a s a t t r ( s d k ,   " S F C l i e n t F a c t o r y " ) 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s d k ` 
 
 
 
 t e s t s \ t e s t _ n e x t _ s d k _ f e a t u r e s . p y : 2 6 5 : 9 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
         | 
 
 2 6 4   |               d e f   t e s t _ e l a p s e d _ m s _ i s _ p o s i t i v e ( s e l f )   - >   N o n e : 
 
 2 6 5   |   /                   f r o m   s p a n f o r g e . s d k   i m p o r t   S F P i p e l i n e 
 
 2 6 6   |   | 
 
 2 6 7   |   |                   i m p o r t   t i m e 
 
         |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   I 0 0 1 
 
 2 6 8   | 
 
 2 6 9   |                       r e s u l t   =   S F P i p e l i n e ( ) . a d d _ s t a g e ( l a m b d a   d :   d ) . r u n ( { } ) 
 
         | 
 
         =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ n e x t _ s d k _ f e a t u r e s . p y : 2 6 7 : 1 6 :   F 4 0 1   [ * ]   ` t i m e `   i m p o r t e d   b u t   u n u s e d 
 
         | 
 
 2 6 5   |                   f r o m   s p a n f o r g e . s d k   i m p o r t   S F P i p e l i n e 
 
 2 6 6   | 
 
 2 6 7   |                   i m p o r t   t i m e 
 
         |                                 ^ ^ ^ ^   F 4 0 1 
 
 2 6 8   | 
 
 2 6 9   |                   r e s u l t   =   S F P i p e l i n e ( ) . a d d _ s t a g e ( l a m b d a   d :   d ) . r u n ( { } ) 
 
         | 
 
         =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` t i m e ` 
 
 
 
 t e s t s \ t e s t _ n e x t _ s d k _ f e a t u r e s . p y : 2 9 7 : 1 6 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s d k `   i n   l i e u   o f   a l i a s 
 
         | 
 
 2 9 6   |           d e f   t e s t _ p i p e l i n e _ r e s u l t _ e x p o r t e d _ f r o m _ s d k ( s e l f )   - >   N o n e : 
 
 2 9 7   |                   i m p o r t   s p a n f o r g e . s d k   a s   s d k 
 
         |                                 ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 2 9 8   | 
 
 2 9 9   |                   a s s e r t   h a s a t t r ( s d k ,   " S F P i p e l i n e " ) 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s d k ` 
 
 
 
 t e s t s \ t e s t _ n e x t _ s d k _ f e a t u r e s . p y : 3 4 9 : 9 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
         | 
 
 3 4 8   |               d e f   t e s t _ f a i l _ s i l e n t _ t r u e _ r e t u r n s _ l o c a l _ r e s u l t _ o n _ e r r o r ( s e l f )   - >   N o n e : 
 
 3 4 9   |   /                   f r o m   s p a n f o r g e . s d k . _ b a s e   i m p o r t   S F C l i e n t C o n f i g 
 
 3 5 0   |   |                   f r o m   s p a n f o r g e . s d k . a u d i t   i m p o r t   S F A u d i t C l i e n t ,   S F C o m p o s i t e A u d i t S i n k 
 
 3 5 1   |   |                   f r o m   s p a n f o r g e . s d k . _ t y p e s   i m p o r t   A u d i t A p p e n d R e s u l t 
 
 3 5 2   |   |                   f r o m   s p a n f o r g e . s i g n i n g   i m p o r t   A u d i t S t r e a m 
 
         |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   I 0 0 1 
 
 3 5 3   | 
 
 3 5 4   |                       c f g   =   S F C l i e n t C o n f i g ( ) 
 
         | 
 
         =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ n e x t _ s d k _ f e a t u r e s . p y : 3 8 5 : 1 6 :   P L R 0 4 0 2   [ * ]   U s e   ` f r o m   s p a n f o r g e   i m p o r t   s d k `   i n   l i e u   o f   a l i a s 
 
         | 
 
 3 8 4   |           d e f   t e s t _ e x p o r t e d _ f r o m _ s p a n f o r g e _ s d k ( s e l f )   - >   N o n e : 
 
 3 8 5   |                   i m p o r t   s p a n f o r g e . s d k   a s   s d k 
 
         |                                 ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   P L R 0 4 0 2 
 
 3 8 6   | 
 
 3 8 7   |                   a s s e r t   h a s a t t r ( s d k ,   " S F C o m p o s i t e A u d i t S i n k " ) 
 
         | 
 
         =   h e l p :   R e p l a c e   w i t h   ` f r o m   s p a n f o r g e   i m p o r t   s d k ` 
 
 
 
 t e s t s \ t e s t _ n e x t _ s d k _ f e a t u r e s . p y : 4 3 0 : 2 8 :   E 7 4 1   A m b i g u o u s   v a r i a b l e   n a m e :   ` l ` 
 
         | 
 
 4 2 8   |                           o u t   =   P a t h ( t m p )   /   " b u n d l e . n d j s o n " 
 
 4 2 9   |                           c l i e n t . e x p o r t _ l o c a l ( o u t ) 
 
 4 3 0   |                           l i n e s   =   [ l   f o r   l   i n   o u t . r e a d _ t e x t ( e n c o d i n g = " u t f - 8 " ) . s p l i t l i n e s ( )   i f   l . s t r i p ( ) ] 
 
         |                                                         ^   E 7 4 1 
 
 4 3 1   |                           a s s e r t   l i n e s ,   " O u t p u t   f i l e   s h o u l d   n o t   b e   e m p t y " 
 
 4 3 2   |                           #   E v e r y   l i n e   m u s t   b e   v a l i d   J S O N 
 
         | 
 
 
 
 t e s t s \ t e s t _ n e x t _ s d k _ f e a t u r e s . p y : 4 4 8 : 2 1 :   E 7 4 1   A m b i g u o u s   v a r i a b l e   n a m e :   ` l ` 
 
         | 
 
 4 4 6   |                           l i n e s   =   [ 
 
 4 4 7   |                                   j s o n . l o a d s ( l ) 
 
 4 4 8   |                                   f o r   l   i n   o u t . r e a d _ t e x t ( e n c o d i n g = " u t f - 8 " ) . s p l i t l i n e s ( ) 
 
         |                                           ^   E 7 4 1 
 
 4 4 9   |                                   i f   l . s t r i p ( ) 
 
 4 5 0   |                           ] 
 
         | 
 
 
 
 t e s t s \ t e s t _ n e x t _ s d k _ f e a t u r e s . p y : 4 6 0 : 9 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
         | 
 
 4 5 9   |               d e f   t e s t _ e x p o r t _ l o c a l _ r e t u r n s _ e x p o r t _ r e s u l t ( s e l f )   - >   N o n e : 
 
 4 6 0   |   /                   f r o m   s p a n f o r g e . s d k . _ b a s e   i m p o r t   S F C l i e n t C o n f i g 
 
 4 6 1   |   |                   f r o m   s p a n f o r g e . s d k . c e c   i m p o r t   S F C E C C l i e n t 
 
 4 6 2   |   |                   f r o m   s p a n f o r g e . s d k . _ t y p e s   i m p o r t   E x p o r t R e s u l t 
 
         |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   I 0 0 1 
 
 4 6 3   | 
 
 4 6 4   |                       c f g   =   S F C l i e n t C o n f i g ( ) 
 
         | 
 
         =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ n e x t _ s d k _ f e a t u r e s . p y : 4 9 3 : 2 1 :   E 7 4 1   A m b i g u o u s   v a r i a b l e   n a m e :   ` l ` 
 
         | 
 
 4 9 1   |                           l i n e s   =   [ 
 
 4 9 2   |                                   j s o n . l o a d s ( l ) 
 
 4 9 3   |                                   f o r   l   i n   o u t . r e a d _ t e x t ( e n c o d i n g = " u t f - 8 " ) . s p l i t l i n e s ( ) 
 
         |                                           ^   E 7 4 1 
 
 4 9 4   |                                   i f   l . s t r i p ( ) 
 
 4 9 5   |                           ] 
 
         | 
 
 
 
 t e s t s \ t e s t _ n e x t _ s d k _ f e a t u r e s . p y : 5 0 0 : 9 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
         | 
 
 4 9 9   |               d e f   t e s t _ e x p o r t _ l o c a l _ r a i s e s _ o n _ u n w r i t a b l e _ p a t h ( s e l f )   - >   N o n e : 
 
 5 0 0   |   /                   f r o m   s p a n f o r g e . s d k . _ b a s e   i m p o r t   S F C l i e n t C o n f i g 
 
 5 0 1   |   |                   f r o m   s p a n f o r g e . s d k . c e c   i m p o r t   S F C E C C l i e n t 
 
 5 0 2   |   |                   f r o m   s p a n f o r g e . s d k . _ e x c e p t i o n s   i m p o r t   S F C E C E x p o r t E r r o r 
 
         |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   I 0 0 1 
 
 5 0 3   | 
 
 5 0 4   |                       c f g   =   S F C l i e n t C o n f i g ( ) 
 
         | 
 
         =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ p h a s e 0 _ s c a l e . p y : 2 3 : 8 :   F 4 0 1   [ * ]   ` h a s h l i b `   i m p o r t e d   b u t   u n u s e d 
 
       | 
 
 2 1   |   f r o m   _ _ f u t u r e _ _   i m p o r t   a n n o t a t i o n s 
 
 2 2   | 
 
 2 3   |   i m p o r t   h a s h l i b 
 
       |                 ^ ^ ^ ^ ^ ^ ^   F 4 0 1 
 
 2 4   |   i m p o r t   s t a t i s t i c s 
 
 2 5   |   i m p o r t   t h r e a d i n g 
 
       | 
 
       =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` h a s h l i b ` 
 
 
 
 t e s t s \ t e s t _ p h a s e 0 _ s c a l e . p y : 2 5 : 8 :   F 4 0 1   [ * ]   ` t h r e a d i n g `   i m p o r t e d   b u t   u n u s e d 
 
       | 
 
 2 3   |   i m p o r t   h a s h l i b 
 
 2 4   |   i m p o r t   s t a t i s t i c s 
 
 2 5   |   i m p o r t   t h r e a d i n g 
 
       |                 ^ ^ ^ ^ ^ ^ ^ ^ ^   F 4 0 1 
 
 2 6   |   i m p o r t   t i m e 
 
 2 7   |   i m p o r t   u u i d 
 
       | 
 
       =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` t h r e a d i n g ` 
 
 
 
 t e s t s \ t e s t _ p h a s e 0 _ s c a l e . p y : 2 7 : 8 :   F 4 0 1   [ * ]   ` u u i d `   i m p o r t e d   b u t   u n u s e d 
 
       | 
 
 2 5   |   i m p o r t   t h r e a d i n g 
 
 2 6   |   i m p o r t   t i m e 
 
 2 7   |   i m p o r t   u u i d 
 
       |                 ^ ^ ^ ^   F 4 0 1 
 
 2 8   |   f r o m   c o n c u r r e n t . f u t u r e s   i m p o r t   T h r e a d P o o l E x e c u t o r ,   a s _ c o m p l e t e d 
 
 2 9   |   f r o m   t y p i n g   i m p o r t   A n y 
 
       | 
 
       =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` u u i d ` 
 
 
 
 t e s t s \ t e s t _ p h a s e 0 _ s c a l e . p y : 3 0 : 2 7 :   F 4 0 1   [ * ]   ` u n i t t e s t . m o c k . M a g i c M o c k `   i m p o r t e d   b u t   u n u s e d 
 
       | 
 
 2 8   |   f r o m   c o n c u r r e n t . f u t u r e s   i m p o r t   T h r e a d P o o l E x e c u t o r ,   a s _ c o m p l e t e d 
 
 2 9   |   f r o m   t y p i n g   i m p o r t   A n y 
 
 3 0   |   f r o m   u n i t t e s t . m o c k   i m p o r t   M a g i c M o c k ,   p a t c h 
 
       |                                                       ^ ^ ^ ^ ^ ^ ^ ^ ^   F 4 0 1 
 
 3 1   | 
 
 3 2   |   i m p o r t   p y t e s t 
 
       | 
 
       =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` u n i t t e s t . m o c k . M a g i c M o c k ` 
 
 
 
 t e s t s \ t e s t _ p h a s e 0 _ s c a l e . p y : 4 0 : 5 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
       | 
 
 3 9   |       d e f   _ m a k e _ o b s e r v e _ c l i e n t ( )   - >   A n y : 
 
 4 0   |   /           f r o m   s p a n f o r g e . s d k . o b s e r v e   i m p o r t   S F O b s e r v e C l i e n t 
 
 4 1   |   |           f r o m   s p a n f o r g e . s d k . _ b a s e   i m p o r t   S F C l i e n t C o n f i g 
 
 4 2   |   |           f r o m   p y d a n t i c   i m p o r t   S e c r e t S t r 
 
       |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   I 0 0 1 
 
 4 3   | 
 
 4 4   |               r e t u r n   S F O b s e r v e C l i e n t ( 
 
       | 
 
       =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ p h a s e 0 _ s c a l e . p y : 5 4 : 5 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
       | 
 
 5 3   |       d e f   _ m a k e _ a u d i t _ c l i e n t ( )   - >   A n y : 
 
 5 4   |   /           f r o m   s p a n f o r g e . s d k . a u d i t   i m p o r t   S F A u d i t C l i e n t 
 
 5 5   |   |           f r o m   s p a n f o r g e . s d k . _ b a s e   i m p o r t   S F C l i e n t C o n f i g 
 
       |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   I 0 0 1 
 
 5 6   | 
 
 5 7   |               r e t u r n   S F A u d i t C l i e n t ( S F C l i e n t C o n f i g ( e n d p o i n t = " " ,   a p i _ k e y = " " ) ) 
 
       | 
 
       =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ p h a s e 0 _ s c a l e . p y : 6 1 : 5 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
       | 
 
 6 0   |       d e f   _ m a k e _ p i i _ c l i e n t ( )   - >   A n y : 
 
 6 1   |   /           f r o m   s p a n f o r g e . s d k . p i i   i m p o r t   S F P I I C l i e n t 
 
 6 2   |   |           f r o m   s p a n f o r g e . s d k . _ b a s e   i m p o r t   S F C l i e n t C o n f i g 
 
 6 3   |   |           f r o m   p y d a n t i c   i m p o r t   S e c r e t S t r 
 
       |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   I 0 0 1 
 
 6 4   | 
 
 6 5   |               r e t u r n   S F P I I C l i e n t ( 
 
       | 
 
       =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ p h a s e 0 _ s c a l e . p y : 1 2 3 : 9 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
         | 
 
 1 2 1   |               d e f   t e s t _ a l l _ 1 1 _ b a c k e n d s _ d i s p a t c h ( s e l f )   - >   N o n e : 
 
 1 2 2   |                       " " " E v e r y   b a c k e n d   i n   S U P P O R T E D _ B A C K E N D S   m u s t   r e a c h   i t s   e x p e c t e d   e n d p o i n t . " " " 
 
 1 2 3   |   /                   f r o m   s p a n f o r g e . s d k . o b s e r v e   i m p o r t   S U P P O R T E D _ B A C K E N D S ,   S F O b s e r v e C l i e n t 
 
 1 2 4   |   |                   f r o m   s p a n f o r g e . s d k . _ b a s e   i m p o r t   S F C l i e n t C o n f i g 
 
 1 2 5   |   |                   f r o m   p y d a n t i c   i m p o r t   S e c r e t S t r 
 
         |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   I 0 0 1 
 
 1 2 6   | 
 
 1 2 7   |                       a s s e r t   l e n ( S U P P O R T E D _ B A C K E N D S )   = =   1 1 ,   ( 
 
         | 
 
         =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ p h a s e 0 _ s c a l e . p y : 2 0 6 : 1 7 :   B 0 0 7   L o o p   c o n t r o l   v a r i a b l e   ` i `   n o t   u s e d   w i t h i n   l o o p   b o d y 
 
         | 
 
 2 0 5   |                   f o r   b a t c h _ s t a r t   i n   r a n g e ( 0 ,   n ,   b a t c h ) : 
 
 2 0 6   |                           f o r   i   i n   r a n g e ( b a t c h _ s t a r t ,   m i n ( b a t c h _ s t a r t   +   b a t c h ,   n ) ) : 
 
         |                                   ^   B 0 0 7 
 
 2 0 7   |                                   c l i e n t . a p p e n d ( 
 
 2 0 8   |                                           { " m o d e l " :   " g p t - 4 o " ,   " v e r d i c t " :   " P A S S " ,   " s c o r e " :   0 . 9 } , 
 
         | 
 
         =   h e l p :   R e n a m e   u n u s e d   ` i `   t o   ` _ i ` 
 
 
 
 t e s t s \ t e s t _ p h a s e 0 _ s c a l e . p y : 4 8 3 : 1 9 :   B 0 0 7   L o o p   c o n t r o l   v a r i a b l e   ` l a b e l `   n o t   u s e d   w i t h i n   l o o p   b o d y 
 
         | 
 
 4 8 1   |                   t o t a l   =   l e n ( s e l f . _ K N O W N _ P I I ) 
 
 4 8 2   |                   t r u e _ p o s i t i v e s   =   0 
 
 4 8 3   |                   f o r   t e x t ,   l a b e l   i n   s e l f . _ K N O W N _ P I I : 
 
         |                                       ^ ^ ^ ^ ^   B 0 0 7 
 
 4 8 4   |                           r e s u l t   =   c l i e n t . s c a n ( { " t e x t " :   t e x t } ) 
 
 4 8 5   |                           i f   n o t   r e s u l t . c l e a n : 
 
         | 
 
         =   h e l p :   R e n a m e   u n u s e d   ` l a b e l `   t o   ` _ l a b e l ` 
 
 
 
 t e s t s \ t e s t _ p h a s e 1 1 _ s e c u r i t y . p y : 2 8 : 2 5 :   T C 0 0 4   M o v e   i m p o r t   ` p a t h l i b . P a t h `   o u t   o f   t y p e - c h e c k i n g   b l o c k .   I m p o r t   i s   u s e d   f o r   m o r e   t h a n   t y p e   h i n t i n g . 
 
       | 
 
 2 7   |   i f   T Y P E _ C H E C K I N G : 
 
 2 8   |           f r o m   p a t h l i b   i m p o r t   P a t h 
 
       |                                                   ^ ^ ^ ^   T C 0 0 4 
 
 2 9   | 
 
 3 0   |   #   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
       | 
 
       =   h e l p :   M o v e   o u t   o f   t y p e - c h e c k i n g   b l o c k 
 
 
 
 t e s t s \ t e s t _ p h a s e 6 _ e n t e r p r i s e _ d e p l o y m e n t _ p a c k a g i n g . p y : 3 : 1 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
       | 
 
   1   |       " " " P h a s e   6   e n t e r p r i s e   d e p l o y m e n t   a n d   e v i d e n c e   p a c k a g i n g   t e s t s . " " " 
 
   2   | 
 
   3   |   /   f r o m   _ _ f u t u r e _ _   i m p o r t   a n n o t a t i o n s 
 
   4   |   | 
 
   5   |   |   i m p o r t   j s o n 
 
   6   |   |   f r o m   p a t h l i b   i m p o r t   P a t h 
 
   7   |   |   f r o m   u n i t t e s t . m o c k   i m p o r t   p a t c h 
 
   8   |   | 
 
   9   |   |   f r o m   s p a n f o r g e . s d k . _ b a s e   i m p o r t   S F C l i e n t C o n f i g 
 
 1 0   |   |   f r o m   s p a n f o r g e . s d k . a u d i t   i m p o r t   S F A u d i t C l i e n t 
 
 1 1   |   |   f r o m   s p a n f o r g e . s d k . e n t e r p r i s e   i m p o r t   S F E n t e r p r i s e C l i e n t 
 
 1 2   |   |   f r o m   s p a n f o r g e . s d k . o p e r a t o r   i m p o r t   S F O p e r a t o r C l i e n t 
 
 1 3   |   | 
 
 1 4   |   |   f r o m   t e s t s . t e s t _ s f _ o p e r a t o r   i m p o r t   _ s e e d _ t r a c e 
 
       |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   I 0 0 1 
 
       | 
 
       =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ p h a s e 6 _ e n t e r p r i s e _ d e p l o y m e n t _ p a c k a g i n g . p y : 6 : 2 1 :   T C 0 0 3   M o v e   s t a n d a r d   l i b r a r y   i m p o r t   ` p a t h l i b . P a t h `   i n t o   a   t y p e - c h e c k i n g   b l o c k 
 
     | 
 
 5   |   i m p o r t   j s o n 
 
 6   |   f r o m   p a t h l i b   i m p o r t   P a t h 
 
     |                                           ^ ^ ^ ^   T C 0 0 3 
 
 7   |   f r o m   u n i t t e s t . m o c k   i m p o r t   p a t c h 
 
     | 
 
     =   h e l p :   M o v e   i n t o   t y p e - c h e c k i n g   b l o c k 
 
 
 
 t e s t s \ t e s t _ p h a s e 6 _ e n t e r p r i s e _ d e p l o y m e n t _ p a c k a g i n g . p y : 1 0 : 3 3 :   F 4 0 1   [ * ]   ` s p a n f o r g e . s d k . a u d i t . S F A u d i t C l i e n t `   i m p o r t e d   b u t   u n u s e d 
 
       | 
 
   9   |   f r o m   s p a n f o r g e . s d k . _ b a s e   i m p o r t   S F C l i e n t C o n f i g 
 
 1 0   |   f r o m   s p a n f o r g e . s d k . a u d i t   i m p o r t   S F A u d i t C l i e n t 
 
       |                                                                   ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   F 4 0 1 
 
 1 1   |   f r o m   s p a n f o r g e . s d k . e n t e r p r i s e   i m p o r t   S F E n t e r p r i s e C l i e n t 
 
 1 2   |   f r o m   s p a n f o r g e . s d k . o p e r a t o r   i m p o r t   S F O p e r a t o r C l i e n t 
 
       | 
 
       =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` s p a n f o r g e . s d k . a u d i t . S F A u d i t C l i e n t ` 
 
 
 
 t e s t s \ t e s t _ p h a s e 6 _ e n t e r p r i s e _ d e p l o y m e n t _ p a c k a g i n g . p y : 1 2 : 3 6 :   F 4 0 1   [ * ]   ` s p a n f o r g e . s d k . o p e r a t o r . S F O p e r a t o r C l i e n t `   i m p o r t e d   b u t   u n u s e d 
 
       | 
 
 1 0   |   f r o m   s p a n f o r g e . s d k . a u d i t   i m p o r t   S F A u d i t C l i e n t 
 
 1 1   |   f r o m   s p a n f o r g e . s d k . e n t e r p r i s e   i m p o r t   S F E n t e r p r i s e C l i e n t 
 
 1 2   |   f r o m   s p a n f o r g e . s d k . o p e r a t o r   i m p o r t   S F O p e r a t o r C l i e n t 
 
       |                                                                         ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   F 4 0 1 
 
 1 3   | 
 
 1 4   |   f r o m   t e s t s . t e s t _ s f _ o p e r a t o r   i m p o r t   _ s e e d _ t r a c e 
 
       | 
 
       =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` s p a n f o r g e . s d k . o p e r a t o r . S F O p e r a t o r C l i e n t ` 
 
 
 
 t e s t s \ t e s t _ p h a s e 6 _ e n t e r p r i s e _ d e p l o y m e n t _ p a c k a g i n g . p y : 1 2 0 : 3 5 :   R U F 1 0 0   [ * ]   U n u s e d   ` n o q a `   d i r e c t i v e   ( n o n - e n a b l e d :   ` B L E 0 0 1 ` ) 
 
         | 
 
 1 1 8   |                   t r y : 
 
 1 1 9   |                           e n t e r p r i s e . g e n e r a t e _ e v i d e n c e _ p a c k a g e ( " t r a c e - b l o c k e d " ) 
 
 1 2 0   |                   e x c e p t   E x c e p t i o n   a s   e x c :     #   n o q a :   B L E 0 0 1 
 
         |                                                                       ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   R U F 1 0 0 
 
 1 2 1   |                           a s s e r t   " e n c r y p t _ a t _ r e s t = T r u e "   i n   s t r ( e x c ) 
 
 1 2 2   |                   e l s e :     #   p r a g m a :   n o   c o v e r 
 
         | 
 
         =   h e l p :   R e m o v e   u n u s e d   ` n o q a `   d i r e c t i v e 
 
 
 
 t e s t s \ t e s t _ p r o m p t _ r e g i s t r y . p y : 8 : 1 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
       | 
 
   6   |       " " " 
 
   7   | 
 
   8   |   /   f r o m   _ _ f u t u r e _ _   i m p o r t   a n n o t a t i o n s 
 
   9   |   | 
 
 1 0   |   |   i m p o r t   t i m e 
 
 1 1   |   |   i m p o r t   u n i t t e s t 
 
 1 2   |   | 
 
 1 3   |   |   f r o m   s p a n f o r g e . p r o m p t _ r e g i s t r y   i m p o r t   ( 
 
 1 4   |   |           P r o m p t R e g i s t r y , 
 
 1 5   |   |           P r o m p t V e r s i o n , 
 
 1 6   |   |           g e t _ p r o m p t _ v e r s i o n , 
 
 1 7   |   |           r e g i s t e r _ p r o m p t , 
 
 1 8   |   |           r e n d e r _ p r o m p t , 
 
 1 9   |   |   ) 
 
       |   | _ ^   I 0 0 1 
 
       | 
 
       =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ p r o m p t _ r e g i s t r y . p y : 1 0 : 8 :   F 4 0 1   [ * ]   ` t i m e `   i m p o r t e d   b u t   u n u s e d 
 
       | 
 
   8   |   f r o m   _ _ f u t u r e _ _   i m p o r t   a n n o t a t i o n s 
 
   9   | 
 
 1 0   |   i m p o r t   t i m e 
 
       |                 ^ ^ ^ ^   F 4 0 1 
 
 1 1   |   i m p o r t   u n i t t e s t 
 
       | 
 
       =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` t i m e ` 
 
 
 
 t e s t s \ t e s t _ r a g . p y : 3 : 1 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
       | 
 
   1   |       " " " T e s t s   f o r   n a m e s p a c e s / r e t r i e v a l . p y   a n d   s d k / r a g . p y   ( F - 4 0 / F - 4 1 ) . " " " 
 
   2   | 
 
   3   |   /   f r o m   _ _ f u t u r e _ _   i m p o r t   a n n o t a t i o n s 
 
   4   |   | 
 
   5   |   |   i m p o r t   p y t e s t 
 
   6   |   | 
 
   7   |   |   f r o m   s p a n f o r g e . n a m e s p a c e s . r e t r i e v a l   i m p o r t   ( 
 
   8   |   |           R A G S e s s i o n P a y l o a d , 
 
   9   |   |           R A G S p a n P a y l o a d , 
 
 1 0   |   |           R e t r i e v a l Q u e r y P a y l o a d , 
 
 1 1   |   |           R e t r i e v a l R e s u l t P a y l o a d , 
 
 1 2   |   |           R e t r i e v e d C h u n k , 
 
 1 3   |   |   ) 
 
 1 4   |   |   f r o m   s p a n f o r g e . s d k   i m p o r t   s f _ r a g 
 
 1 5   |   |   f r o m   s p a n f o r g e . s d k . r a g   i m p o r t   R A G S t a t u s I n f o ,   S F R A G C l i e n t 
 
 1 6   |   |   f r o m   s p a n f o r g e . s d k . _ b a s e   i m p o r t   S F C l i e n t C o n f i g 
 
 1 7   |   |   f r o m   s p a n f o r g e . s d k . _ t y p e s   i m p o r t   S e c r e t S t r 
 
       |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   I 0 0 1 
 
       | 
 
       =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ r a g . p y : 1 4 : 2 7 :   F 4 0 1   [ * ]   ` s p a n f o r g e . s d k . s f _ r a g `   i m p o r t e d   b u t   u n u s e d 
 
       | 
 
 1 2   |           R e t r i e v e d C h u n k , 
 
 1 3   |   ) 
 
 1 4   |   f r o m   s p a n f o r g e . s d k   i m p o r t   s f _ r a g 
 
       |                                                       ^ ^ ^ ^ ^ ^   F 4 0 1 
 
 1 5   |   f r o m   s p a n f o r g e . s d k . r a g   i m p o r t   R A G S t a t u s I n f o ,   S F R A G C l i e n t 
 
 1 6   |   f r o m   s p a n f o r g e . s d k . _ b a s e   i m p o r t   S F C l i e n t C o n f i g 
 
       | 
 
       =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` s p a n f o r g e . s d k . s f _ r a g ` 
 
 
 
 t e s t s \ t e s t _ r e p o _ g u a r d r a i l s . p y : 3 : 1 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
       | 
 
   1   |       " " " R e p o s i t o r y   g u a r d r a i l s   a g a i n s t   p u b l i c - s u r f a c e   d r i f t . " " " 
 
   2   | 
 
   3   |   /   f r o m   _ _ f u t u r e _ _   i m p o r t   a n n o t a t i o n s 
 
   4   |   | 
 
   5   |   |   i m p o r t   r e 
 
   6   |   |   f r o m   p a t h l i b   i m p o r t   P a t h 
 
   7   |   | 
 
   8   |   |   i m p o r t   p y t e s t 
 
   9   |   | 
 
 1 0   |   |   f r o m   s p a n f o r g e . _ c l i   i m p o r t   m a i n 
 
       |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   I 0 0 1 
 
       | 
 
       =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ s d k _ e x p l a i n . p y : 1 0 : 1 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
       | 
 
   8   |       " " " 
 
   9   | 
 
 1 0   |   /   f r o m   _ _ f u t u r e _ _   i m p o r t   a n n o t a t i o n s 
 
 1 1   |   | 
 
 1 2   |   |   f r o m   u n i t t e s t . m o c k   i m p o r t   M a g i c M o c k ,   p a t c h 
 
 1 3   |   | 
 
 1 4   |   |   i m p o r t   p y t e s t 
 
 1 5   |   | 
 
 1 6   |   |   f r o m   s p a n f o r g e . s d k . _ b a s e   i m p o r t   S F C l i e n t C o n f i g 
 
 1 7   |   |   f r o m   s p a n f o r g e . s d k . e x p l a i n   i m p o r t   ( 
 
 1 8   |   |           E U A I A c t C l a u s e , 
 
 1 9   |   |           E x p l a i n R e c o r d , 
 
 2 0   |   |           M o d e l O u t p u t T y p e , 
 
 2 1   |   |           S F E x p l a i n C l i e n t , 
 
 2 2   |   |   ) 
 
       |   | _ ^   I 0 0 1 
 
       | 
 
       =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ s d k _ s c o p e . p y : 1 2 : 1 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
       | 
 
 1 0   |       " " " 
 
 1 1   | 
 
 1 2   |   /   f r o m   _ _ f u t u r e _ _   i m p o r t   a n n o t a t i o n s 
 
 1 3   |   | 
 
 1 4   |   |   f r o m   p a t h l i b   i m p o r t   P a t h 
 
 1 5   |   |   f r o m   u n i t t e s t . m o c k   i m p o r t   M a g i c M o c k ,   c a l l ,   p a t c h 
 
 1 6   |   | 
 
 1 7   |   |   i m p o r t   p y t e s t 
 
 1 8   |   | 
 
 1 9   |   |   f r o m   s p a n f o r g e . s d k . _ b a s e   i m p o r t   S F C l i e n t C o n f i g 
 
 2 0   |   |   f r o m   s p a n f o r g e . s d k . s c o p e   i m p o r t   _ p a r s e _ s c o p e _ y a m l ,   S c o p e M a n i f e s t ,   S F S c o p e C l i e n t 
 
       |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   I 0 0 1 
 
       | 
 
       =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ s d k _ s c o p e . p y : 1 5 : 3 8 :   F 4 0 1   [ * ]   ` u n i t t e s t . m o c k . c a l l `   i m p o r t e d   b u t   u n u s e d 
 
       | 
 
 1 4   |   f r o m   p a t h l i b   i m p o r t   P a t h 
 
 1 5   |   f r o m   u n i t t e s t . m o c k   i m p o r t   M a g i c M o c k ,   c a l l ,   p a t c h 
 
       |                                                                             ^ ^ ^ ^   F 4 0 1 
 
 1 6   | 
 
 1 7   |   i m p o r t   p y t e s t 
 
       | 
 
       =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` u n i t t e s t . m o c k . c a l l ` 
 
 
 
 t e s t s \ t e s t _ s d k _ s c o p e . p y : 8 2 : 2 0 :   C 4 0 8   U n n e c e s s a r y   ` d i c t ( ) `   c a l l   ( r e w r i t e   a s   a   l i t e r a l ) 
 
       | 
 
 8 0   |               t r a c e _ i d :   s t r   =   " t r a c e - 1 b 2 " , 
 
 8 1   |       )   - >   o b j e c t : 
 
 8 2   |               k w a r g s :   d i c t   =   d i c t ( 
 
       |     _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^ 
 
 8 3   |   |                   t r a c e _ i d = t r a c e _ i d , 
 
 8 4   |   |                   a g e n t _ i d = a g e n t _ i d , 
 
 8 5   |   |                   r e s o u r c e = r e s o u r c e , 
 
 8 6   |   |                   a c t i o n _ n a m e = a c t i o n , 
 
 8 7   |   |                   c h e c k e d _ a t = " 2 0 2 6 - 0 5 - 0 9 T 1 0 : 0 0 : 0 0 Z " , 
 
 8 8   |   |           ) 
 
       |   | _ _ _ _ _ ^   C 4 0 8 
 
 8 9   |               i f   c a p a b i l i t y   i s   n o t   N o n e : 
 
 9 0   |                       k w a r g s [ " c a p a b i l i t y " ]   =   c a p a b i l i t y 
 
       | 
 
       =   h e l p :   R e w r i t e   a s   a   l i t e r a l 
 
 
 
 t e s t s \ t e s t _ s d k _ v a l i d a t e . p y : 1 6 : 1 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
       | 
 
 1 4   |       " " " 
 
 1 5   | 
 
 1 6   |   /   f r o m   _ _ f u t u r e _ _   i m p o r t   a n n o t a t i o n s 
 
 1 7   |   | 
 
 1 8   |   |   f r o m   t y p i n g   i m p o r t   A n y 
 
 1 9   |   |   f r o m   u n i t t e s t . m o c k   i m p o r t   M a g i c M o c k ,   p a t c h 
 
 2 0   |   | 
 
 2 1   |   |   i m p o r t   p y t e s t 
 
 2 2   |   | 
 
 2 3   |   |   f r o m   s p a n f o r g e . s d k . _ b a s e   i m p o r t   S F C l i e n t C o n f i g 
 
 2 4   |   |   f r o m   s p a n f o r g e . s d k . v a l i d a t e   i m p o r t   ( 
 
 2 5   |   |           S F V a l i d a t e C l i e n t , 
 
 2 6   |   |           V a l i d a t e S t a t u s I n f o , 
 
 2 7   |   |           V a l i d a t i o n R e s u l t , 
 
 2 8   |   |           V i o l a t i o n , 
 
 2 9   |   |           _ v a l i d a t e _ a g a i n s t _ s c h e m a , 
 
 3 0   |   |   ) 
 
       |   | _ ^   I 0 0 1 
 
       | 
 
       =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ s d k _ v a l i d a t e . p y : 2 6 : 5 :   F 4 0 1   [ * ]   ` s p a n f o r g e . s d k . v a l i d a t e . V a l i d a t e S t a t u s I n f o `   i m p o r t e d   b u t   u n u s e d 
 
       | 
 
 2 4   |   f r o m   s p a n f o r g e . s d k . v a l i d a t e   i m p o r t   ( 
 
 2 5   |           S F V a l i d a t e C l i e n t , 
 
 2 6   |           V a l i d a t e S t a t u s I n f o , 
 
       |           ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   F 4 0 1 
 
 2 7   |           V a l i d a t i o n R e s u l t , 
 
 2 8   |           V i o l a t i o n , 
 
       | 
 
       =   h e l p :   R e m o v e   u n u s e d   i m p o r t 
 
 
 
 t e s t s \ t e s t _ s d k _ v a l i d a t e . p y : 2 9 : 5 :   F 4 0 1   [ * ]   ` s p a n f o r g e . s d k . v a l i d a t e . _ v a l i d a t e _ a g a i n s t _ s c h e m a `   i m p o r t e d   b u t   u n u s e d 
 
       | 
 
 2 7   |           V a l i d a t i o n R e s u l t , 
 
 2 8   |           V i o l a t i o n , 
 
 2 9   |           _ v a l i d a t e _ a g a i n s t _ s c h e m a , 
 
       |           ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   F 4 0 1 
 
 3 0   |   ) 
 
       | 
 
       =   h e l p :   R e m o v e   u n u s e d   i m p o r t 
 
 
 
 t e s t s \ t e s t _ s d k _ v a l i d a t e . p y : 3 2 4 : 1 3 :   F 8 4 1   L o c a l   v a r i a b l e   ` r e s u l t `   i s   a s s i g n e d   t o   b u t   n e v e r   u s e d 
 
         | 
 
 3 2 3   |                   w i t h   p a t c h ( " s p a n f o r g e . s d k . s f _ a u d i t " ,   m o c k _ a u d i t ,   c r e a t e = T r u e ) : 
 
 3 2 4   |                           r e s u l t   =   c l i e n t . v a l i d a t e ( " H e l l o   w o r l d . " ,   c o n f i d e n c e _ s c o r e = 0 . 9 0 ) 
 
         |                           ^ ^ ^ ^ ^ ^   F 8 4 1 
 
 3 2 5   | 
 
 3 2 6   |                   m o c k _ a u d i t . a p p e n d . a s s e r t _ c a l l e d _ o n c e ( ) 
 
         | 
 
         =   h e l p :   R e m o v e   a s s i g n m e n t   t o   u n u s e d   v a r i a b l e   ` r e s u l t ` 
 
 
 
 t e s t s \ t e s t _ s d k _ v a l i d a t e . p y : 3 4 1 : 1 3 :   F 8 4 1   L o c a l   v a r i a b l e   ` r e s u l t `   i s   a s s i g n e d   t o   b u t   n e v e r   u s e d 
 
         | 
 
 3 4 0   |                   w i t h   p a t c h ( " s p a n f o r g e . s d k . s f _ a u d i t " ,   m o c k _ a u d i t ,   c r e a t e = T r u e ) : 
 
 3 4 1   |                           r e s u l t   =   c l i e n t . v a l i d a t e ( 
 
         |                           ^ ^ ^ ^ ^ ^   F 8 4 1 
 
 3 4 2   |                                   " n o t - j s o n " , 
 
 3 4 3   |                                   s c h e m a = { " t y p e " :   " o b j e c t " } , 
 
         | 
 
         =   h e l p :   R e m o v e   a s s i g n m e n t   t o   u n u s e d   v a r i a b l e   ` r e s u l t ` 
 
 
 
 t e s t s \ t e s t _ s d k _ v a l i d a t e . p y : 3 9 8 : 1 3 :   F 8 4 1   L o c a l   v a r i a b l e   ` r e s u l t `   i s   a s s i g n e d   t o   b u t   n e v e r   u s e d 
 
         | 
 
 3 9 6   |                           p a t c h ( " s p a n f o r g e . s d k . s f _ p i i " ,   m o c k _ p i i ,   c r e a t e = T r u e ) , 
 
 3 9 7   |                   ) : 
 
 3 9 8   |                           r e s u l t   =   c l i e n t . v a l i d a t e ( 
 
         |                           ^ ^ ^ ^ ^ ^   F 8 4 1 
 
 3 9 9   |                                   " V i s i t   L o n d o n   f o r   t h e   e v e n t . " , 
 
 4 0 0   |                                   c o n f i d e n c e _ s c o r e = 0 . 9 0 , 
 
         | 
 
         =   h e l p :   R e m o v e   a s s i g n m e n t   t o   u n u s e d   v a r i a b l e   ` r e s u l t ` 
 
 
 
 t e s t s \ t e s t _ s f _ a u d i t . p y : 9 5 1 : 9 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
         | 
 
 9 4 9   |               @ p y t e s t . f i x t u r e ( ) 
 
 9 5 0   |               d e f   c l i e n t ( s e l f )   - >   S F A u d i t C l i e n t : 
 
 9 5 1   |   /                   f r o m   s p a n f o r g e . s d k . a u d i t   i m p o r t   S F A u d i t C l i e n t 
 
 9 5 2   |   |                   f r o m   s p a n f o r g e . s d k . _ b a s e   i m p o r t   S F C l i e n t C o n f i g 
 
         |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   I 0 0 1 
 
 9 5 3   | 
 
 9 5 4   |                       r e t u r n   S F A u d i t C l i e n t ( S F C l i e n t C o n f i g ( e n d p o i n t = " " ,   a p i _ k e y = " " ) ) 
 
         | 
 
         =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ s f _ a u d i t . p y : 1 0 1 3 : 7 3 :   F 8 4 1   L o c a l   v a r i a b l e   ` m o c k _ o p e n `   i s   a s s i g n e d   t o   b u t   n e v e r   u s e d 
 
           | 
 
 1 0 1 2   |                   c u s t o m _ u r l   =   " h t t p : / / c u s t o m - t s a . e x a m p l e . c o m " 
 
 1 0 1 3   |                   w i t h   p a t c h ( " u r l l i b . r e q u e s t . u r l o p e n " ,   r e t u r n _ v a l u e = m o c k _ r e s p )   a s   m o c k _ o p e n : 
 
           |                                                                                                                                                   ^ ^ ^ ^ ^ ^ ^ ^ ^   F 8 4 1 
 
 1 0 1 4   |                           r e s u l t   =   c l i e n t . s t a m p _ w i t h _ t s a ( r e c o r d ,   t s a _ u r l = c u s t o m _ u r l ) 
 
           | 
 
           =   h e l p :   R e m o v e   a s s i g n m e n t   t o   u n u s e d   v a r i a b l e   ` m o c k _ o p e n ` 
 
 
 
 t e s t s \ t e s t _ s f _ a u d i t . p y : 1 0 2 5 : 9 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
           | 
 
 1 0 2 4   |               d e f   t e s t _ s t a m p _ w i t h _ t s a _ r a i s e s _ o n _ h t t p _ e r r o r ( s e l f ,   c l i e n t :   S F A u d i t C l i e n t )   - >   N o n e : 
 
 1 0 2 5   |   /                   i m p o r t   u r l l i b . e r r o r 
 
 1 0 2 6   |   |                   f r o m   u n i t t e s t . m o c k   i m p o r t   p a t c h 
 
 1 0 2 7   |   |                   f r o m   s p a n f o r g e . s d k . _ e x c e p t i o n s   i m p o r t   S F A u d i t A p p e n d E r r o r 
 
           |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   I 0 0 1 
 
 1 0 2 8   | 
 
 1 0 2 9   |                       r e c o r d   =   { " k " :   " v " } 
 
           | 
 
           =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ s f _ a u d i t . p y : 1 0 3 5 : 9 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
           | 
 
 1 0 3 4   |               d e f   t e s t _ s t a m p _ w i t h _ t s a _ r a i s e s _ o n _ n o n _ 2 0 0 _ s t a t u s ( s e l f ,   c l i e n t :   S F A u d i t C l i e n t )   - >   N o n e : 
 
 1 0 3 5   |   /                   f r o m   u n i t t e s t . m o c k   i m p o r t   M a g i c M o c k ,   p a t c h 
 
 1 0 3 6   |   |                   f r o m   s p a n f o r g e . s d k . _ e x c e p t i o n s   i m p o r t   S F A u d i t A p p e n d E r r o r 
 
           |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   I 0 0 1 
 
 1 0 3 7   | 
 
 1 0 3 8   |                       r e c o r d   =   { " k " :   " v " } 
 
           | 
 
           =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ s f _ c e c . p y : 1 1 9 0 : 9 :   P T H 1 0 8   ` o s . u n l i n k ( ) `   s h o u l d   b e   r e p l a c e d   b y   ` P a t h . u n l i n k ( ) ` 
 
           | 
 
 1 1 8 8   |                   i m p o r t   o s 
 
 1 1 8 9   | 
 
 1 1 9 0   |                   o s . u n l i n k ( r e s u l t . z i p _ p a t h ) 
 
           |                   ^ ^ ^ ^ ^ ^ ^ ^ ^   P T H 1 0 8 
 
 1 1 9 1   |                   w i t h   p y t e s t . r a i s e s ( S F C E C B u i l d E r r o r ,   m a t c h = " n o   l o n g e r   e x i s t s " ) : 
 
 1 1 9 2   |                           c e c . r e i s s u e _ d o w n l o a d _ u r l ( r e s u l t . b u n d l e _ i d ) 
 
           | 
 
 
 
 t e s t s \ t e s t _ s f _ o p e r a t o r . p y : 6 : 2 1 :   T C 0 0 3   M o v e   s t a n d a r d   l i b r a r y   i m p o r t   ` p a t h l i b . P a t h `   i n t o   a   t y p e - c h e c k i n g   b l o c k 
 
     | 
 
 5   |   i m p o r t   j s o n 
 
 6   |   f r o m   p a t h l i b   i m p o r t   P a t h 
 
     |                                           ^ ^ ^ ^   T C 0 0 3 
 
 7   |   f r o m   u n i t t e s t . m o c k   i m p o r t   p a t c h 
 
     | 
 
     =   h e l p :   M o v e   i n t o   t y p e - c h e c k i n g   b l o c k 
 
 
 
 t e s t s \ t e s t _ s f _ p o l i c y _ i n t e g r a t i o n . p y : 3 : 1 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
       | 
 
   1   |       " " " I n t e g r a t i o n   t e s t s   f o r   p o l i c y - a w a r e   P h a s e   1   s e r v i c e   w r a p p e r s . " " " 
 
   2   | 
 
   3   |   /   f r o m   _ _ f u t u r e _ _   i m p o r t   a n n o t a t i o n s 
 
   4   |   | 
 
   5   |   |   f r o m   u n i t t e s t . m o c k   i m p o r t   M a g i c M o c k ,   p a t c h 
 
   6   |   | 
 
   7   |   |   f r o m   s p a n f o r g e . n a m e s p a c e s . r u n t i m e _ g o v e r n a n c e   i m p o r t   G r o u n d i n g C l a i m 
 
   8   |   |   f r o m   s p a n f o r g e . r u n t i m e _ p o l i c y   i m p o r t   R u n t i m e P o l i c y B u n d l e ,   R u n t i m e P o l i c y R u l e 
 
   9   |   |   f r o m   s p a n f o r g e . s d k . _ b a s e   i m p o r t   S F C l i e n t C o n f i g 
 
 1 0   |   |   f r o m   s p a n f o r g e . s d k . e x p l a i n   i m p o r t   S F E x p l a i n C l i e n t 
 
 1 1   |   |   f r o m   s p a n f o r g e . s d k . l i n e a g e   i m p o r t   S F L i n e a g e C l i e n t 
 
 1 2   |   |   f r o m   s p a n f o r g e . s d k . p o l i c y   i m p o r t   S F P o l i c y C l i e n t 
 
 1 3   |   |   f r o m   s p a n f o r g e . s d k . r a g   i m p o r t   S F R A G C l i e n t 
 
 1 4   |   |   f r o m   s p a n f o r g e . s d k . r b a c   i m p o r t   S F R B A C C l i e n t 
 
 1 5   |   |   f r o m   s p a n f o r g e . s d k . s c o p e   i m p o r t   S F S c o p e C l i e n t 
 
 1 6   |   |   f r o m   s p a n f o r g e . s d k . _ t y p e s   i m p o r t   S e c r e t S t r 
 
       |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   I 0 0 1 
 
       | 
 
       =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ s f _ r a g . p y : 3 : 1 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
       | 
 
   1   |       " " " T e s t s   f o r   G A   g r o u n d i n g   a d d i t i o n s   i n   s p a n f o r g e . s d k . r a g . " " " 
 
   2   | 
 
   3   |   /   f r o m   _ _ f u t u r e _ _   i m p o r t   a n n o t a t i o n s 
 
   4   |   | 
 
   5   |   |   f r o m   u n i t t e s t . m o c k   i m p o r t   M a g i c M o c k ,   p a t c h 
 
   6   |   | 
 
   7   |   |   i m p o r t   p y t e s t 
 
   8   |   | 
 
   9   |   |   f r o m   s p a n f o r g e . n a m e s p a c e s . r u n t i m e _ g o v e r n a n c e   i m p o r t   G r o u n d i n g C l a i m 
 
 1 0   |   |   f r o m   s p a n f o r g e . s d k . _ b a s e   i m p o r t   S F C l i e n t C o n f i g 
 
 1 1   |   |   f r o m   s p a n f o r g e . s d k . r a g   i m p o r t   S F R A G C l i e n t 
 
 1 2   |   |   f r o m   s p a n f o r g e . s d k . _ t y p e s   i m p o r t   S e c r e t S t r 
 
       |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   I 0 0 1 
 
       | 
 
       =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ s f _ s e c r e t s . p y : 2 9 0 : 9 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
         | 
 
 2 8 8   |           d e f   t e s t _ s a r i f _ a l l _ 2 0 _ r u l e s _ p r e s e n t ( s e l f )   - >   N o n e : 
 
 2 8 9   |                   " " " S A R I F   o u t p u t   m u s t   i n c l u d e   r u l e   d e f i n i t i o n s   f o r   a l l   2 0   p a t t e r n   t y p e s . " " " 
 
 2 9 0   |                   f r o m   s p a n f o r g e . s e c r e t s   i m p o r t   S e c r e t s S c a n n e r ,   S e c r e t s S c a n R e s u l t ,   S e c r e t H i t 
 
         |                   ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   I 0 0 1 
 
 2 9 1   |                   s c a n n e r   =   S e c r e t s S c a n n e r ( ) 
 
 2 9 2   |                   e x p e c t e d _ t y p e s   =   { 
 
         | 
 
         =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ s f _ s e c r e t s . p y : 2 9 1 : 9 :   F 8 4 1   L o c a l   v a r i a b l e   ` s c a n n e r `   i s   a s s i g n e d   t o   b u t   n e v e r   u s e d 
 
         | 
 
 2 8 9   |                   " " " S A R I F   o u t p u t   m u s t   i n c l u d e   r u l e   d e f i n i t i o n s   f o r   a l l   2 0   p a t t e r n   t y p e s . " " " 
 
 2 9 0   |                   f r o m   s p a n f o r g e . s e c r e t s   i m p o r t   S e c r e t s S c a n n e r ,   S e c r e t s S c a n R e s u l t ,   S e c r e t H i t 
 
 2 9 1   |                   s c a n n e r   =   S e c r e t s S c a n n e r ( ) 
 
         |                   ^ ^ ^ ^ ^ ^ ^   F 8 4 1 
 
 2 9 2   |                   e x p e c t e d _ t y p e s   =   { 
 
 2 9 3   |                           " b e a r e r _ t o k e n " ,   " a w s _ a c c e s s _ k e y " ,   " g c p _ s e r v i c e _ a c c o u n t " ,   " p e m _ p r i v a t e _ k e y " , 
 
         | 
 
         =   h e l p :   R e m o v e   a s s i g n m e n t   t o   u n u s e d   v a r i a b l e   ` s c a n n e r ` 
 
 
 
 t e s t s \ t e s t _ s f _ s e c r e t s . p y : 1 1 1 4 : 9 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
           | 
 
 1 1 1 3   |           d e f   t e s t _ a l l _ 2 0 _ p a t t e r n _ t y p e s _ h a v e _ v a u l t _ h i n t s ( s e l f )   - >   N o n e : 
 
 1 1 1 4   |                   f r o m   s p a n f o r g e . s e c r e t s   i m p o r t   _ V A U L T _ H I N T S ,   _ P A T T E R N _ R E G I S T R Y 
 
           |                   ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   I 0 0 1 
 
 1 1 1 5   | 
 
 1 1 1 6   |                   p a t t e r n _ t y p e s   =   { e n t r y [ 0 ]   f o r   e n t r y   i n   _ P A T T E R N _ R E G I S T R Y } 
 
           | 
 
           =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ v a l i d a t e . p y : 4 2 2 : 9 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
         | 
 
 4 2 1   |               d e f   t e s t _ s t r i c t _ r a i s e s _ o n _ i n v a l i d _ e v e n t ( s e l f )   - >   N o n e : 
 
 4 2 2   |   /                   f r o m   s p a n f o r g e . v a l i d a t e   i m p o r t   E n f o r c e m e n t M o d e ,   e n f o r c e _ e v e n t 
 
 4 2 3   |   |                   f r o m   s p a n f o r g e . e x c e p t i o n s   i m p o r t   S c h e m a V a l i d a t i o n E r r o r 
 
         |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   I 0 0 1 
 
 4 2 4   | 
 
 4 2 5   |                       e v e n t   =   _ m i n i m a l _ e v e n t ( ) 
 
         | 
 
         =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ v a l i d a t e . p y : 4 5 1 : 9 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
         | 
 
 4 5 0   |               d e f   t e s t _ l e n i e n t _ m o d e _ r a i s e s _ w i t h _ a l l _ v i o l a t i o n s ( s e l f )   - >   N o n e : 
 
 4 5 1   |   /                   f r o m   s p a n f o r g e . v a l i d a t e   i m p o r t   E n f o r c e m e n t M o d e ,   e n f o r c e _ e v e n t 
 
 4 5 2   |   |                   f r o m   s p a n f o r g e . e x c e p t i o n s   i m p o r t   S c h e m a V a l i d a t i o n E r r o r 
 
         |   | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^   I 0 0 1 
 
 4 5 3   | 
 
 4 5 4   |                       c o r r u p t   =   M a g i c M o c k ( s p e c = E v e n t ) 
 
         | 
 
         =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ v a l i d a t e . p y : 4 8 2 : 5 7 :   F 4 0 1   [ * ]   ` s p a n f o r g e . v a l i d a t e . V a l i d a t i o n R e s u l t `   i m p o r t e d   b u t   u n u s e d 
 
         | 
 
 4 8 1   |           d e f   t e s t _ v a l i d _ e v e n t _ s t r i c t _ r e t u r n s _ r e s u l t _ w i t h _ n o _ v i o l a t i o n s ( s e l f )   - >   N o n e : 
 
 4 8 2   |                   f r o m   s p a n f o r g e . v a l i d a t e   i m p o r t   E n f o r c e m e n t M o d e ,   V a l i d a t i o n R e s u l t ,   e n f o r c e _ e v e n t 
 
         |                                                                                                                   ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   F 4 0 1 
 
 4 8 3   | 
 
 4 8 4   |                   r e s u l t   =   e n f o r c e _ e v e n t ( _ m i n i m a l _ e v e n t ( ) ,   m o d e = E n f o r c e m e n t M o d e . S T R I C T ) 
 
         | 
 
         =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` s p a n f o r g e . v a l i d a t e . V a l i d a t i o n R e s u l t ` 
 
 
 
 t e s t s \ t e s t _ v a l i d a t e . p y : 4 8 9 : 5 7 :   F 4 0 1   [ * ]   ` s p a n f o r g e . v a l i d a t e . V a l i d a t i o n R e s u l t `   i m p o r t e d   b u t   u n u s e d 
 
         | 
 
 4 8 8   |           d e f   t e s t _ v a l i d _ e v e n t _ w a r n _ r e t u r n s _ v a l i d _ r e s u l t ( s e l f )   - >   N o n e : 
 
 4 8 9   |                   f r o m   s p a n f o r g e . v a l i d a t e   i m p o r t   E n f o r c e m e n t M o d e ,   V a l i d a t i o n R e s u l t ,   e n f o r c e _ e v e n t 
 
         |                                                                                                                   ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   F 4 0 1 
 
 4 9 0   | 
 
 4 9 1   |                   r e s u l t   =   e n f o r c e _ e v e n t ( _ m i n i m a l _ e v e n t ( ) ,   m o d e = E n f o r c e m e n t M o d e . W A R N ) 
 
         | 
 
         =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` s p a n f o r g e . v a l i d a t e . V a l i d a t i o n R e s u l t ` 
 
 
 
 t e s t s \ t e s t _ w o r k f l o w . p y : 1 6 : 1 :   I 0 0 1   [ * ]   I m p o r t   b l o c k   i s   u n - s o r t e d   o r   u n - f o r m a t t e d 
 
       | 
 
 1 4   |       " " " 
 
 1 5   | 
 
 1 6   |   /   f r o m   _ _ f u t u r e _ _   i m p o r t   a n n o t a t i o n s 
 
 1 7   |   | 
 
 1 8   |   |   i m p o r t   j s o n 
 
 1 9   |   |   i m p o r t   t h r e a d i n g 
 
 2 0   |   |   i m p o r t   t i m e 
 
 2 1   |   |   f r o m   d a t e t i m e   i m p o r t   d a t e t i m e ,   t i m e d e l t a ,   t i m e z o n e 
 
 2 2   |   |   f r o m   t y p i n g   i m p o r t   A n y 
 
 2 3   |   | 
 
 2 4   |   |   i m p o r t   p y t e s t 
 
 2 5   |   | 
 
 2 6   |   |   f r o m   s p a n f o r g e . w o r k f l o w   i m p o r t   ( 
 
 2 7   |   |           A c t i o n N o t A l l o w e d E r r o r , 
 
 2 8   |   |           I n v a l i d T r a n s i t i o n E r r o r , 
 
 2 9   |   |           R o l e C o n f i g , 
 
 3 0   |   |           S L A S t a t u s , 
 
 3 1   |   |           W o r k f l o w A c t i o n , 
 
 3 2   |   |           W o r k f l o w A u d i t E n t r y , 
 
 3 3   |   |           W o r k f l o w E n g i n e , 
 
 3 4   |   |           W o r k f l o w N o t i f i c a t i o n H o o k , 
 
 3 5   |   |           W o r k f l o w R e g i s t r y , 
 
 3 6   |   |           W o r k f l o w S t a t e , 
 
 3 7   |   |           W o r k f l o w T y p e , 
 
 3 8   |   |   ) 
 
       |   | _ ^   I 0 0 1 
 
       | 
 
       =   h e l p :   O r g a n i z e   i m p o r t s 
 
 
 
 t e s t s \ t e s t _ w o r k f l o w . p y : 3 2 : 5 :   F 4 0 1   [ * ]   ` s p a n f o r g e . w o r k f l o w . W o r k f l o w A u d i t E n t r y `   i m p o r t e d   b u t   u n u s e d 
 
       | 
 
 3 0   |           S L A S t a t u s , 
 
 3 1   |           W o r k f l o w A c t i o n , 
 
 3 2   |           W o r k f l o w A u d i t E n t r y , 
 
       |           ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   F 4 0 1 
 
 3 3   |           W o r k f l o w E n g i n e , 
 
 3 4   |           W o r k f l o w N o t i f i c a t i o n H o o k , 
 
       | 
 
       =   h e l p :   R e m o v e   u n u s e d   i m p o r t :   ` s p a n f o r g e . w o r k f l o w . W o r k f l o w A u d i t E n t r y ` 
 
 
 
 t e s t s \ t e s t _ w o r k f l o w . p y : 4 7 : 3 2 :   C 4 0 8   U n n e c e s s a r y   ` d i c t ( ) `   c a l l   ( r e w r i t e   a s   a   l i t e r a l ) 
 
       | 
 
 4 6   |       d e f   _ m a k e _ g a t e _ r e v i e w ( * * k w a r g s :   A n y )   - >   W o r k f l o w E n g i n e : 
 
 4 7   |               d e f a u l t s :   d i c t [ s t r ,   A n y ]   =   d i c t ( 
 
       |     _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^ 
 
 4 8   |   |                   w o r k f l o w _ t y p e = " g a t e _ r e v i e w " , 
 
 4 9   |   |                   t r i g g e r _ e v e n t = { 
 
 5 0   |   |                           " g a t e _ n a m e " :   " g o v e r n a n c e " , 
 
 5 1   |   |                           " m o d e l _ i d " :   " m o d e l _ a b c 1 2 3 " , 
 
 5 2   |   |                           " p o l i c y _ v e r s i o n " :   2 , 
 
 5 3   |   |                   } , 
 
 5 4   |   |                   a s s i g n e e s = [ " c o m p l i a n c e _ o f f i c e r @ c o m p a n y . c o m " ,   " c t o @ c o m p a n y . c o m " ] , 
 
 5 5   |   |                   s l a _ h o u r s = 2 4 , 
 
 5 6   |   |                   e s c a l a t i o n _ a f t e r _ h o u r s = 1 2 , 
 
 5 7   |   |           ) 
 
       |   | _ _ _ _ _ ^   C 4 0 8 
 
 5 8   |               d e f a u l t s . u p d a t e ( k w a r g s ) 
 
 5 9   |               r e t u r n   W o r k f l o w E n g i n e ( * * d e f a u l t s ) 
 
       | 
 
       =   h e l p :   R e w r i t e   a s   a   l i t e r a l 
 
 
 
 t e s t s \ t e s t _ w o r k f l o w . p y : 6 3 : 3 2 :   C 4 0 8   U n n e c e s s a r y   ` d i c t ( ) `   c a l l   ( r e w r i t e   a s   a   l i t e r a l ) 
 
       | 
 
 6 2   |       d e f   _ m a k e _ p o l i c y _ a p p r o v a l ( * * k w a r g s :   A n y )   - >   W o r k f l o w E n g i n e : 
 
 6 3   |               d e f a u l t s :   d i c t [ s t r ,   A n y ]   =   d i c t ( 
 
       |     _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^ 
 
 6 4   |   |                   w o r k f l o w _ t y p e = " p o l i c y _ a p p r o v a l " , 
 
 6 5   |   |                   t r i g g e r _ e v e n t = { " p o l i c y _ n a m e " :   " d a t a _ r e t e n t i o n _ v 2 " ,   " v e r s i o n " :   3 } , 
 
 6 6   |   |                   a s s i g n e e s = [ 
 
 6 7   |   |                           " s e c u r i t y @ c o m p a n y . c o m " , 
 
 6 8   |   |                           " c o m p l i a n c e _ o f f i c e r @ c o m p a n y . c o m " , 
 
 6 9   |   |                           " b u s i n e s s @ c o m p a n y . c o m " , 
 
 7 0   |   |                   ] , 
 
 7 1   |   |                   s l a _ h o u r s = 4 8 , 
 
 7 2   |   |                   e s c a l a t i o n _ a f t e r _ h o u r s = 2 4 , 
 
 7 3   |   |           ) 
 
       |   | _ _ _ _ _ ^   C 4 0 8 
 
 7 4   |               d e f a u l t s . u p d a t e ( k w a r g s ) 
 
 7 5   |               r e t u r n   W o r k f l o w E n g i n e ( * * d e f a u l t s ) 
 
       | 
 
       =   h e l p :   R e w r i t e   a s   a   l i t e r a l 
 
 
 
 t e s t s \ t e s t _ w o r k f l o w . p y : 7 9 : 3 2 :   C 4 0 8   U n n e c e s s a r y   ` d i c t ( ) `   c a l l   ( r e w r i t e   a s   a   l i t e r a l ) 
 
       | 
 
 7 8   |       d e f   _ m a k e _ e s c a l a t i o n ( * * k w a r g s :   A n y )   - >   W o r k f l o w E n g i n e : 
 
 7 9   |               d e f a u l t s :   d i c t [ s t r ,   A n y ]   =   d i c t ( 
 
       |     _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^ 
 
 8 0   |   |                   w o r k f l o w _ t y p e = " e s c a l a t i o n " , 
 
 8 1   |   |                   t r i g g e r _ e v e n t = { " t y p e " :   " d r i f t _ d e t e c t e d " ,   " m o d e l _ i d " :   " m o d e l _ x y z " ,   " d e l t a " :   0 . 1 2 } , 
 
 8 2   |   |                   a s s i g n e e s = [ " c t o @ c o m p a n y . c o m " ] , 
 
 8 3   |   |                   s l a _ h o u r s = 4 , 
 
 8 4   |   |                   e s c a l a t i o n _ a f t e r _ h o u r s = 2 , 
 
 8 5   |   |           ) 
 
       |   | _ _ _ _ _ ^   C 4 0 8 
 
 8 6   |               d e f a u l t s . u p d a t e ( k w a r g s ) 
 
 8 7   |               r e t u r n   W o r k f l o w E n g i n e ( * * d e f a u l t s ) 
 
       | 
 
       =   h e l p :   R e w r i t e   a s   a   l i t e r a l 
 
 
 
 t e s t s \ t e s t _ w o r k f l o w . p y : 1 2 7 9 : 3 9 :   R U F 1 0 0   [ * ]   U n u s e d   ` n o q a `   d i r e c t i v e   ( n o n - e n a b l e d :   ` B L E 0 0 1 ` ) 
 
           | 
 
 1 2 7 7   |                                           r e a s o n = f " A u t o - a p p r o v e   # { i } " , 
 
 1 2 7 8   |                                   ) 
 
 1 2 7 9   |                           e x c e p t   E x c e p t i o n   a s   e x c :     #   n o q a :   B L E 0 0 1 
 
           |                                                                               ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   R U F 1 0 0 
 
 1 2 8 0   |                                   e r r o r s . a p p e n d ( e x c ) 
 
           | 
 
           =   h e l p :   R e m o v e   u n u s e d   ` n o q a `   d i r e c t i v e 
 
 
 
 t e s t s \ t e s t _ w o r k f l o w . p y : 1 3 1 1 : 3 9 :   R U F 1 0 0   [ * ]   U n u s e d   ` n o q a `   d i r e c t i v e   ( n o n - e n a b l e d :   ` B L E 0 0 1 ` ) 
 
           | 
 
 1 3 0 9   |                           e x c e p t   ( I n v a l i d T r a n s i t i o n E r r o r ,   A c t i o n N o t A l l o w e d E r r o r ) : 
 
 1 3 1 0   |                                   p a s s     #   e x p e c t e d   w h e n   r a c i n g   o n   t e r m i n a l   s t a t e 
 
 1 3 1 1   |                           e x c e p t   E x c e p t i o n   a s   e x c :     #   n o q a :   B L E 0 0 1 
 
           |                                                                               ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^   R U F 1 0 0 
 
 1 3 1 2   |                                   e r r o r s . a p p e n d ( e x c ) 
 
           | 
 
           =   h e l p :   R e m o v e   u n u s e d   ` n o q a `   d i r e c t i v e 
 
 
 
 F o u n d   2 9 5   e r r o r s . 
 
 [ * ]   1 8 0   f i x a b l e   w i t h   t h e   ` - - f i x `   o p t i o n   ( 4 3   h i d d e n   f i x e s   c a n   b e   e n a b l e d   w i t h   t h e   ` - - u n s a f e - f i x e s `   o p t i o n ) . 
 
 