
    sgcv                        d Z ddlZddlZddlZddlZddlmZ ddlmZm	Z	m
Z
mZmZmZ ddlZddlmZ ddlmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z% er e!       rddl&Z& e$jN                  e(      Z)ed   Z* G d	 d
e      Z+ G d de      Z, ee,jZ                        e,_-        e,jZ                  j                   8e,jZ                  j                   j]                  ddd      e,jZ                  _         yy)zH
Feature extraction saving/loading class for common feature extractors.
    N)UserDict)TYPE_CHECKINGAnyDictOptionalTupleUnion   )custom_object_save)FEATURE_EXTRACTOR_NAMEPushToHubMixin
TensorTypeadd_model_info_to_auto_map"add_model_info_to_custom_pipelinescached_file	copy_funcdownload_urlis_flax_availableis_jax_tensoris_numpy_arrayis_offline_modeis_remote_urlis_tf_availableis_torch_availableis_torch_deviceis_torch_dtypeloggingrequires_backendsSequenceFeatureExtractorc                        e Zd ZdZddeeeef      dedee	f   f fdZ
dedee   fdZdefd	Zd
 Zd Zd Zd Zd Zddeeee	f      fdZddeeee	f      fdZddZ xZS )BatchFeatureaU  
    Holds the output of the [`~SequenceFeatureExtractor.pad`] and feature extractor specific `__call__` methods.

    This class is derived from a python dictionary and can be used as a dictionary.

    Args:
        data (`dict`, *optional*):
            Dictionary of lists/arrays/tensors returned by the __call__/pad methods ('input_values', 'attention_mask',
            etc.).
        tensor_type (`Union[None, str, TensorType]`, *optional*):
            You can give a tensor_type here to convert the lists of integers in PyTorch/TensorFlow/Numpy Tensors at
            initialization.
    Ndatatensor_typec                 H    t         |   |       | j                  |       y )N)r#   )super__init__convert_to_tensors)selfr"   r#   	__class__s      X/var/www/html/venv/lib/python3.12/site-packages/transformers/feature_extraction_utils.pyr&   zBatchFeature.__init__M   s!    K8    itemreturnc                 V    t        |t              r| j                  |   S t        d      )z
        If the key is a string, returns the value of the dict associated to `key` ('input_values', 'attention_mask',
        etc.).
        zRIndexing with integers is not available when using Python based feature extractors)
isinstancestrr"   KeyErrorr(   r,   s     r*   __getitem__zBatchFeature.__getitem__Q   s(    
 dC 99T?"oppr+   c                 H    	 | j                   |   S # t        $ r t        w xY wN)r"   r1   AttributeErrorr2   s     r*   __getattr__zBatchFeature.__getattr__[   s*    	!99T?" 	!  	!s    !c                     d| j                   iS Nr"   r"   r(   s    r*   __getstate__zBatchFeature.__getstate__a   s    		""r+   c                 "    d|v r|d   | _         y y r9   r:   )r(   states     r*   __setstate__zBatchFeature.__setstate__d   s    U?fDI r+   c                 6    | j                   j                         S r5   )r"   keysr;   s    r*   rA   zBatchFeature.keysi   s    yy~~r+   c                 6    | j                   j                         S r5   )r"   valuesr;   s    r*   rC   zBatchFeature.valuesm   s    yy!!r+   c                 6    | j                   j                         S r5   )r"   itemsr;   s    r*   rE   zBatchFeature.itemsq   s    yy  r+   c                    |yt        |t              st        |      }|t        j                  k(  r5t               st	        d      dd l}|j                  |j                  }|fS |t        j                  k(  r.t               st	        d      dd l
fdj                  }|fS |t        j                  k(  r1t               st	        d      dd lm} |j                  t         }|fS dfd	t"        }|fS )	NNNzSUnable to convert output to TensorFlow tensors format, TensorFlow is not installed.r   zMUnable to convert output to PyTorch tensors format, PyTorch is not installed.c                    t        | t        t        f      rt        |       dkD  rt        | d   t        j
                        rt	        j                  |       } n_t        | d   t        t        f      rFt        | d         dkD  r5t        | d   d   t        j
                        rt	        j                  |       } t        | t        j
                        r j                  |       S  j                  |       S )Nr   )	r/   listtuplelennpndarrayarray
from_numpytensor)valuetorchs    r*   	as_tensorz5BatchFeature._get_is_as_tensor_fns.<locals>.as_tensor   s    edE]3E
Q!%(BJJ7 ""58dE];aMA-&uQx{BJJ? "eRZZ0+5++E22'5<<..r+   zEUnable to convert output to JAX tensors format, JAX is not installed.c                    t        | t        t        f      rt        | d   t        t        t        j                  f      r`| D cg c]  }t        |       }}t        t        |            dkD  r1|/ | D cg c]  }t        j                  |       c}t              } t        j                  | |      S c c}w c c}w )Nr   r
   )dtype)	r/   rI   rJ   rL   rM   rK   setasarrayobject)rQ   rU   val
value_lensrS   s       r*   rS   z5BatchFeature._get_is_as_tensor_fns.<locals>.as_tensor   s    edE]3
58dTY[][e[eMf8g6;!<s#c(!<J!<3z?+a/EM )e*Ls2::c?*LTZ [zz%u55	 "= +Ms   B77B<r5   )r/   r   
TENSORFLOWr   ImportError
tensorflowconstant	is_tensorPYTORCHr   rR   JAXr   	jax.numpynumpyrN   r   r   )r(   r#   tfr_   jnprS   rR   s        @@r*   _get_is_as_tensor_fnsz"BatchFeature._get_is_as_tensor_fnst   s    +z2$[1K *///"$!i  $IIP )##O J...%'!"qrr/ I& )##% JNN*$&!"ijj#		I%I )##6 'I)##r+   c                     || S | j                  |      \  }}| j                         D ]  \  }}	  ||      s ||      }|| |<    | S #  |dk(  rt        d      t        d      xY w)a5  
        Convert the inner content to tensors.

        Args:
            tensor_type (`str` or [`~utils.TensorType`], *optional*):
                The type of tensors to use. If `str`, should be one of the values of the enum [`~utils.TensorType`]. If
                `None`, no modification is done.
        overflowing_valueszKUnable to create tensor returning overflowing values of different lengths. zUnable to create tensor, you should probably activate padding with 'padding=True' to have batched tensors with the same length.)rf   rE   
ValueError)r(   r#   r_   rS   keyrQ   rP   s          r*   r'   zBatchFeature.convert_to_tensors   s     K#99+F	9 **, 	JC '&u-F &DI	 ..$%rss X s   A		A&c                 <   t        | dg       ddl}i }|j                  d      }|et        |      dkD  rW|d   }t	        |      rnFt        |t              st        |      st        |t              r|}nt        dt        |       d      | j                         D ]v  \  }}t        ||j                        r( |j                  |      r |j                  |i |||<   Dt        ||j                        r||j                  |      ||<   r|||<   x || _        | S )a  
        Send all values to device by calling `v.to(*args, **kwargs)` (PyTorch only). This should support casting in
        different `dtypes` and sending the `BatchFeature` to a different `device`.

        Args:
            args (`Tuple`):
                Will be passed to the `to(...)` function of the tensors.
            kwargs (`Dict`, *optional*):
                Will be passed to the `to(...)` function of the tensors.

        Returns:
            [`BatchFeature`]: The same instance after modification.
        rR   r   Ndevicez*Attempting to cast a BatchFeature to type z. This is not supported.)rl   )r   rR   getrK   r   r/   r0   r   intri   rE   Tensoris_floating_pointtor"   )	r(   argskwargsrR   new_datarl   argkvs	            r*   rq   zBatchFeature.to   s    	$	*H%>c$i!mq'Cc"C%)=CQTAU !#McRUhZWo!pqqJJL 	 DAq!U\\*/Fu/F/Fq/I"addD3F3Au||,1Cdd&d1	  	r+   rG   r5   )r-   r!   )__name__
__module____qualname____doc__r   r   r0   r   r	   r   r&   r3   r7   r<   r?   rA   rC   rE   rf   r'   rq   __classcell__)r)   s   @r*   r!   r!   >   s    9Xd38n5 95QUWZ\fQfKg 9q qc
 q! !#&
 "!9$%Z:P1Q 9$vhuS*_7M.N >*r+   r!   c                      e Zd ZdZdZd ZdefdZe	 	 	 	 	 dde	ee
j                  f   dee	ee
j                  f      ded	ed
ee	eef      defd       Zdde	ee
j                  f   defdZede	ee
j                  f   deeeef   eeef   f   fd       Zedeeef   defd       Zdeeef   fdZede	ee
j                  f   defd       ZdefdZde	ee
j                  f   fdZd Zedd       Zy)FeatureExtractionMixinz
    This is a feature extraction mixin used to provide saving/loading functionality for sequential and image feature
    extractors.
    Nc           
          |j                  dd      | _        |j                         D ]  \  }}	 t        | ||        y# t        $ r%}t
        j                  d| d| d|         |d}~ww xY w)z'Set elements of `kwargs` as attributes.processor_classNz
Can't set z with value z for )pop_processor_classrE   setattrr6   loggererror)r(   rs   rj   rQ   errs        r*   r&   zFeatureExtractionMixin.__init__  sx     !'

+<d C ,,. 	JCc5)	 " z#l5'tfMN	s   ?	A- A((A-r   c                     || _         y)z%Sets processor class as an attribute.N)r   )r(   r   s     r*   _set_processor_classz+FeatureExtractionMixin._set_processor_class  s
     /r+   pretrained_model_name_or_path	cache_dirforce_downloadlocal_files_onlytokenrevisionc                    ||d<   ||d<   ||d<   ||d<   |j                  dd      }|)t        j                  dt               |t	        d      |}|||d	<    | j
                  |fi |\  }	} | j                  |	fi |S )
a  
        Instantiate a type of [`~feature_extraction_utils.FeatureExtractionMixin`] from a feature extractor, *e.g.* a
        derived class of [`SequenceFeatureExtractor`].

        Args:
            pretrained_model_name_or_path (`str` or `os.PathLike`):
                This can be either:

                - a string, the *model id* of a pretrained feature_extractor hosted inside a model repo on
                  huggingface.co.
                - a path to a *directory* containing a feature extractor file saved using the
                  [`~feature_extraction_utils.FeatureExtractionMixin.save_pretrained`] method, e.g.,
                  `./my_model_directory/`.
                - a path or url to a saved feature extractor JSON *file*, e.g.,
                  `./my_model_directory/preprocessor_config.json`.
            cache_dir (`str` or `os.PathLike`, *optional*):
                Path to a directory in which a downloaded pretrained model feature extractor should be cached if the
                standard cache should not be used.
            force_download (`bool`, *optional*, defaults to `False`):
                Whether or not to force to (re-)download the feature extractor files and override the cached versions
                if they exist.
            resume_download:
                Deprecated and ignored. All downloads are now resumed by default when possible.
                Will be removed in v5 of Transformers.
            proxies (`Dict[str, str]`, *optional*):
                A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
                'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request.
            token (`str` or `bool`, *optional*):
                The token to use as HTTP bearer authorization for remote files. If `True`, or not specified, will use
                the token generated when running `huggingface-cli login` (stored in `~/.huggingface`).
            revision (`str`, *optional*, defaults to `"main"`):
                The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
                git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
                identifier allowed by git.


                <Tip>

                To test a pull request you made on the Hub, you can pass `revision="refs/pr/<pr_number>"`.

                </Tip>

            return_unused_kwargs (`bool`, *optional*, defaults to `False`):
                If `False`, then this function returns just the final feature extractor object. If `True`, then this
                functions returns a `Tuple(feature_extractor, unused_kwargs)` where *unused_kwargs* is a dictionary
                consisting of the key/value pairs whose keys are not feature extractor attributes: i.e., the part of
                `kwargs` which has not been used to update `feature_extractor` and is otherwise ignored.
            kwargs (`Dict[str, Any]`, *optional*):
                The values in kwargs of any keys which are feature extractor attributes will be used to override the
                loaded values. Behavior concerning key/value pairs whose keys are *not* feature extractor attributes is
                controlled by the `return_unused_kwargs` keyword parameter.

        Returns:
            A feature extractor of type [`~feature_extraction_utils.FeatureExtractionMixin`].

        Examples:

        ```python
        # We can't instantiate directly the base class *FeatureExtractionMixin* nor *SequenceFeatureExtractor* so let's show the examples on a
        # derived class: *Wav2Vec2FeatureExtractor*
        feature_extractor = Wav2Vec2FeatureExtractor.from_pretrained(
            "facebook/wav2vec2-base-960h"
        )  # Download feature_extraction_config from huggingface.co and cache.
        feature_extractor = Wav2Vec2FeatureExtractor.from_pretrained(
            "./test/saved_model/"
        )  # E.g. feature_extractor (or model) was saved using *save_pretrained('./test/saved_model/')*
        feature_extractor = Wav2Vec2FeatureExtractor.from_pretrained("./test/saved_model/preprocessor_config.json")
        feature_extractor = Wav2Vec2FeatureExtractor.from_pretrained(
            "facebook/wav2vec2-base-960h", return_attention_mask=False, foo=False
        )
        assert feature_extractor.return_attention_mask is False
        feature_extractor, unused_kwargs = Wav2Vec2FeatureExtractor.from_pretrained(
            "facebook/wav2vec2-base-960h", return_attention_mask=False, foo=False, return_unused_kwargs=True
        )
        assert feature_extractor.return_attention_mask is False
        assert unused_kwargs == {"foo": False}
        ```r   r   r   r   use_auth_tokenNrThe `use_auth_token` argument is deprecated and will be removed in v5 of Transformers. Please use `token` instead.V`token` and `use_auth_token` are both specified. Please set only the argument `token`.r   )r   warningswarnFutureWarningri   get_feature_extractor_dict	from_dict)
clsr   r   r   r   r   r   rs   r   feature_extractor_dicts
             r*   from_pretrainedz&FeatureExtractionMixin.from_pretrained  s    p ({#1 %5!"%z$4d;%MM E   l  #E#F7O)G)G)GHe)pio)p&s}}3>v>>r+   save_directorypush_to_hubc           	      6   |j                  dd      }|<t        j                  dt               |j	                  dd      t        d      ||d<   t        j                  j                  |      rt        d| d      t        j                  |d	       |rr|j                  d
d      }|j                  d|j                  t        j                  j                        d         } | j                  |fi |}| j                  |      }| j                  t!        | ||        t        j                  j#                  |t$              }| j'                  |       t(        j+                  d|        |r%| j-                  ||j	                  d             |gS )az  
        Save a feature_extractor object to the directory `save_directory`, so that it can be re-loaded using the
        [`~feature_extraction_utils.FeatureExtractionMixin.from_pretrained`] class method.

        Args:
            save_directory (`str` or `os.PathLike`):
                Directory where the feature extractor JSON file will be saved (will be created if it does not exist).
            push_to_hub (`bool`, *optional*, defaults to `False`):
                Whether or not to push your model to the Hugging Face model hub after saving it. You can specify the
                repository you want to push to with `repo_id` (will default to the name of `save_directory` in your
                namespace).
            kwargs (`Dict[str, Any]`, *optional*):
                Additional key word arguments passed along to the [`~utils.PushToHubMixin.push_to_hub`] method.
        r   Nr   r   r   zProvided path (z#) should be a directory, not a fileT)exist_okcommit_messagerepo_id)configzFeature extractor saved in )r   r   )r   r   r   r   rm   ri   ospathisfileAssertionErrormakedirssplitsep_create_repo_get_files_timestamps_auto_classr   joinr   to_json_filer   info_upload_modified_files)	r(   r   r   rs   r   r   r   files_timestampsoutput_feature_extractor_files	            r*   save_pretrainedz&FeatureExtractionMixin.save_pretrained  s     $4d;%MM E zz'4(4 l  -F7O77>>.) ?>2BBe!fgg
NT2#ZZ(8$?NjjN,@,@,Mb,QRG'd'':6:G#99.I 't^DA )+^E[(\%7812O1PQR'' -jj) (  ...r+   r-   c                    |j                  dd      }|j                  dd      }|j                  dd      }|j                  dd      }|j                  dd      }|j                  dd      }|j                  d	d      }	|j                  d
d      }
|j                  dd      }|	)t        j                  dt               |t	        d      |	}|j                  dd      }|j                  dd      }d|d}|||d<   t               r|
st        j                  d       d}
t        |      }t        j                  j                  |      }t        j                  j                  |      r$t        j                  j                  |t              }t        j                  j                  |      r|}d}n6t        |      r|}t!        |      }nt        }	 t#        |||||||
||||      }	 t)        |dd      5 }|j+                         }ddd       t-        j.                        }|rt        j                  d|        nt        j                  d d |        |s,d!|v rt3        |d!   |      |d!<   d"|v rt5        |d"   |      |d"<   ||fS # t$        $ r  t&        $ r t%        d| d| dt         d      w xY w# 1 sw Y   xY w# t,        j0                  $ r t%        d| d      w xY w)#a6  
        From a `pretrained_model_name_or_path`, resolve to a dictionary of parameters, to be used for instantiating a
        feature extractor of type [`~feature_extraction_utils.FeatureExtractionMixin`] using `from_dict`.

        Parameters:
            pretrained_model_name_or_path (`str` or `os.PathLike`):
                The identifier of the pre-trained checkpoint from which we want the dictionary of parameters.

        Returns:
            `Tuple[Dict, Dict]`: The dictionary(ies) that will be used to instantiate the feature extractor object.
        r   Nr   Fresume_downloadproxies	subfolderr   r   r   r   r   r   _from_pipeline
_from_autofeature extractor)	file_typefrom_auto_classusing_pipelinez+Offline mode: forcing local_files_only=TrueT)	r   r   r   r   r   r   r   
user_agentr   z"Can't load feature extractor for 'z'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'z2' is the correct path to a directory containing a z filerutf-8encodingz"It looks like the config file at 'z' is not a valid JSON file.zloading configuration file z from cache at auto_mapcustom_pipelines)r   r   r   r   ri   r   r   r   r0   r   r   isdirr   r   r   r   r   r   EnvironmentError	ExceptionopenreadjsonloadsJSONDecodeErrorr   r   )r   r   rs   r   r   r   r   r   r   r   r   r   from_pipeliner   r   is_localfeature_extractor_fileresolved_feature_extractor_filereadertextr   s                        r*   r   z1FeatureExtractionMixin.get_feature_extractor_dict  sD    JJ{D1	$4e< **%6=**Y-JJ{D1	

7D)$4d;!::&8%@::j$/%MM E   l  #E

#3T: **\59#6?[
$+8J'(%5KKEF#(+,I(J%77==!>?77==67%'WW\\2OQg%h"77>>78.K+H89%B".:;X.Y+%;"2=1*'#1#$3%5')%3/4		5sWM %QW{{}%%)ZZ%5" KK56U5VWXKK-.D-E_UtTuv 335O*:68U6&z2 "%;;=_*+=>@]>&'9: &v--S $   &89V8W X99V8W X//E.FeM % % ## 	"45T4UUpq 	s0   J )K 7J<K ,J9<KK #K+r   c                    |j                  dd      }g }|j                         D ]   \  }}||v s|||<   |j                  |       " |D ]  }|j                  |d         | di |}t        j	                  d|        |r||fS |S )a	  
        Instantiates a type of [`~feature_extraction_utils.FeatureExtractionMixin`] from a Python dictionary of
        parameters.

        Args:
            feature_extractor_dict (`Dict[str, Any]`):
                Dictionary that will be used to instantiate the feature extractor object. Such a dictionary can be
                retrieved from a pretrained checkpoint by leveraging the
                [`~feature_extraction_utils.FeatureExtractionMixin.to_dict`] method.
            kwargs (`Dict[str, Any]`):
                Additional parameters from which to initialize the feature extractor object.

        Returns:
            [`~feature_extraction_utils.FeatureExtractionMixin`]: The feature extractor object instantiated from those
            parameters.
        return_unused_kwargsFNzFeature extractor  )r   rE   appendr   r   )r   r   rs   r   	to_removerj   rQ   feature_extractors           r*   r   z FeatureExtractionMixin.from_dict5  s    $  &zz*@%H 	 ,,. 	&JC,,.3&s+  %	&  	"CJJsD!	"  9"89():(;<=$f,,$$r+   c                     t        j                  | j                        }| j                  j                  |d<   d|v r|d= d|v r|d= |S )z
        Serializes this instance to a Python dictionary. Returns:
            `Dict[str, Any]`: Dictionary of all the attributes that make up this configuration instance.
        feature_extractor_typemel_filterswindow)copydeepcopy__dict__r)   rx   )r(   outputs     r*   to_dictzFeatureExtractionMixin.to_dictZ  sP    
 t}}-+/>>+B+B'(F"}%vx r+   	json_filec                     t        |dd      5 }|j                         }ddd       t        j                        } | di |S # 1 sw Y   &xY w)a  
        Instantiates a feature extractor of type [`~feature_extraction_utils.FeatureExtractionMixin`] from the path to
        a JSON file of parameters.

        Args:
            json_file (`str` or `os.PathLike`):
                Path to the JSON file containing the parameters.

        Returns:
            A feature extractor of type [`~feature_extraction_utils.FeatureExtractionMixin`]: The feature_extractor
            object instantiated from that JSON file.
        r   r   r   Nr   )r   r   r   r   )r   r   r   r   r   s        r*   from_json_filez%FeatureExtractionMixin.from_json_fileg  sP     )S73 	!v;;=D	!!%D!1,+,,	! 	!s   AAc                    | j                         }|j                         D ]3  \  }}t        |t        j                        s!|j                         ||<   5 |j                  dd      }|||d<   t        j                  |dd      dz   S )z
        Serializes this instance to a JSON string.

        Returns:
            `str`: String containing all the attributes that make up this feature_extractor instance in JSON format.
        r   Nr      T)indent	sort_keys
)	r   rE   r/   rL   rM   tolistr   r   dumps)r(   
dictionaryrj   rQ   r   s        r*   to_json_stringz%FeatureExtractionMixin.to_json_stringz  s     \\^
$**, 	1JC%,"',,.
3	1 &>>*<dC',<J()zz*Q$?$FFr+   json_file_pathc                     t        |dd      5 }|j                  | j                                ddd       y# 1 sw Y   yxY w)z
        Save this instance to a JSON file.

        Args:
            json_file_path (`str` or `os.PathLike`):
                Path to the JSON file in which this feature_extractor instance's parameters will be saved.
        wr   r   N)r   writer   )r(   r   writers      r*   r   z#FeatureExtractionMixin.to_json_file  s<     .#8 	0FLL,,./	0 	0 	0s	    8Ac                 T    | j                   j                   d| j                          S )N )r)   rx   r   r;   s    r*   __repr__zFeatureExtractionMixin.__repr__  s(    ..))*!D,?,?,A+BCCr+   c                     t        |t              s|j                  }ddlmc m} t        ||      st        | d      || _        y)a  
        Register this class with a given auto class. This should only be used for custom feature extractors as the ones
        in the library are already mapped with `AutoFeatureExtractor`.

        <Tip warning={true}>

        This API is experimental and may have some slight breaking changes in the next releases.

        </Tip>

        Args:
            auto_class (`str` or `type`, *optional*, defaults to `"AutoFeatureExtractor"`):
                The auto class to register this new feature extractor with.
        r   Nz is not a valid auto class.)	r/   r0   rx   transformers.models.automodelsautohasattrri   r   )r   
auto_classauto_modules      r*   register_for_auto_classz.FeatureExtractionMixin.register_for_auto_class  sC      *c*#,,J66{J/
|+FGHH$r+   )NFFNmain)F)AutoFeatureExtractor)rx   ry   rz   r{   r   r&   r0   r   classmethodr	   r   PathLiker   boolr   r   r   r   r   r   PreTrainedFeatureExtractorr   r   r   r   r   r   r   r   r+   r*   r~   r~      s   
 K
0C 0  8<$!&,0m?',S"++-='>m? E#r{{"234m? 	m?
 m? c4i()m? m? m?^;/eC4D.E ;/TX ;/z r.,1#r{{2B,Cr.	tCH~tCH~-	.r. r.h "%tCH~ "%Lf "% "%Hc3h  -uS"++-='> -C] - -$G G*	05bkk1A+B 	0D % %r+   r~   r   r   zfeature extractor file)rX   object_classobject_files)/r{   r   r   r   r   collectionsr   typingr   r   r   r   r   r	   rc   rL   dynamic_module_utilsr   utilsr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rR   
get_loggerrx   r   r  r!   r~   r   formatr   r+   r*   <module>r     s      	    C C  4     .  
		H	%"#=> z8 zzz%^ z%z &//E/Q/Q%R  "%%--91G1S1S1[1[1b1b"1GVn 2c 2&&. :r+   