
    HR-e	                         d Z ddlmZ ddlmZmZ g Zd Zd Zd Z	 ej
        dee            ej        dee            ej        dee	           dS )	z
The following are private functions. These functions are registered into
:meth:`~astropy.cosmology.Cosmology.to_format` and
:meth:`~astropy.cosmology.Cosmology.from_format` and should only be accessed
via these methods.
    )convert_registry)_COSMOLOGY_CLASSES	Cosmologyc                    |                     d          }t          |t                    rt          |         }|&t          | |          st	          d|  d| d          | S )a  Return the |Cosmology| unchanged.

    Parameters
    ----------
    cosmo : `~astropy.cosmology.Cosmology`
        The cosmology to return.
    **kwargs
        This argument is required for compatibility with the standard set of
        keyword arguments in format `~astropy.cosmology.Cosmology.from_format`,
        e.g. "cosmology". If "cosmology" is included and is not `None`,
        ``cosmo`` is checked for correctness.

    Returns
    -------
    `~astropy.cosmology.Cosmology` subclass instance
        Just ``cosmo`` passed through.

    Raises
    ------
    TypeError
        If the |Cosmology| object is not an instance of ``cosmo`` (and
        ``cosmology`` is not `None`).
    	cosmologyNz
cosmology z is not an z
 instance.)get
isinstancestrr   	TypeError)cosmokwargsr   s      >lib/python3.11/site-packages/astropy/cosmology/io/cosmology.pyfrom_cosmologyr      sm    2 

;''I)S!! 2&y1	Zy%A%ALULLyLLLMMML    c                     | S )a"  Return the |Cosmology| unchanged.

    Parameters
    ----------
    cosmo : `~astropy.cosmology.Cosmology`
        The cosmology to return.
    *args
        Not used.

    Returns
    -------
    `~astropy.cosmology.Cosmology` subclass instance
        Just ``cosmo`` passed through.
     )r   argss     r   to_cosmologyr   2   s	     Lr   c                 T    d}| dk    rt          |d         t                    o|dv }|S )z^Identify if object is a `~astropy.cosmology.Cosmology`.

    Returns
    -------
    bool
    Fread   )Nastropy.cosmology)r	   r   )originformatr   r   itiss        r   cosmology_identifyr   D   s?     D$q'9-- 
11 	 Kr   r   N)__doc__astropy.cosmology.connectr   astropy.cosmology.corer   r   __all__r   r   r   register_readerregister_writerregister_identifierr   r   r   <module>r$      s     7 6 6 6 6 6 @ @ @ @ @ @ @ @
  D  $  $ !   !4i P P P     !4i N N N $  $%8)EW X X X X Xr   