
    'Vh                          G d  d      Z y)c                       e Zd ZdZd Zd Zy)exporta!  Decorator to export a public API in a given package.

    Example usage:

    ```python
    @export(package="keras_tuner", path="keras_tuner.applications.HyperResNet")
    class HyperResNet:
        ...
    ```

    You can also pass a list of paths as `path`, to make
    the same symbol visible under various aliases:

    ```python
    @export(
        package="keras_tuner",
        path=[
            "keras_tuner.applications.HyperResNet",
            "keras_tuner.applications.resnet.HyperResNet",
        ])
    class HyperResNet:
        ...
    ```

    **Note:** All export packages must start with the package name.
    Yes, that is redundant, but that is a helpful sanity check.
    The expectation is that each package will customize
    `export_api` to provide a default value for `package`,
    which will serve to validate all `path` values
    and avoid users inadvertendly ending up with non-exported
    symbols due to a bad path (e.g. `path="applications.HyperResNet"`
    instead of `path="keras_tuner.applications.HyperResNet"`).
    c                     t        |t              r|g}n-t        |t              r|}nt        d| dt	        |             |D ]'  }|j                  |dz         rt        d| d|        || _        || _        y )Nz,Invalid type for `path` argument: Received 'z
' of type .z,All `export_path` values should start with 'z.'. Received: path=)
isinstancestrlist
ValueErrortype
startswithpackagepath)selfr   r   export_pathsps        </home/dcms/DCMS/lib/python3.12/site-packages/namex/export.py__init__zexport.__init__$   s    dC  6Ld#L!F #:,(   	A<<#. B7) L&&*V- 	 	    c           	          t        |d      rA|j                  t        |      k(  r)t        d| d|j                   d| j
                   d      | j
                  |_        t        |      |_        |S )N_api_export_pathzSymbol z is already exported as 'z'. Cannot also export it to 'z'.)hasattr_api_export_symbol_ididr	   r   r   )r   symbols     r   __call__zexport.__call__:   s    6-.63O3OSUT
 4
 &!:6;R;R:S T--1YYKr;  #'))')&z$r   N)__name__
__module____qualname____doc__r   r    r   r   r   r      s     D,
r   r   N)r   r   r   r   <module>r       s   C Cr   