o
    „o™i†  ã                   @   sB   d dl Z d dlmZmZ 	ddedededee def
d	d
„ZdS )é    N)ÚCallableÚOptionalFÚhook_fxÚparamÚexplicitÚmin_argsÚreturnc                 C   sV   t | dƒr| j} t | ¡}|jdd… }||v p*| o|jdup*t|tƒo*t|ƒ|kS )z÷
    Args:
        hook_fx: the hook callable
        param: the name of the parameter to check
        explicit: whether the parameter has to be explicitly declared
        min_args: whether the `signature` has at least `min_args` parameters
    Ú__wrapped__é   N)	Úhasattrr	   ÚinspectÚgetfullargspecÚargsÚvarargsÚ
isinstanceÚintÚlen)r   r   r   r   Ú
parametersr   © r   ú_/home/ubuntu/.local/lib/python3.10/site-packages/lightning/pytorch/utilities/signature_utils.pyÚis_param_in_hook_signature   s   


ÿýr   )FN)r   Útypingr   r   ÚstrÚboolr   r   r   r   r   r   Ú<module>   s   ÿÿÿÿÿþ