
    &`i              	       t    d dl mZmZ deeeeeef                  deeeef         deeeef         fdZd ZdS )    )OptionalUnionvalconvert_typereturnc           	      2   | dS t          |           |u r| S |t          u rD	 t          |           } n# t          $ r& t          d|  dt          |            d|           w xY w|t          u rD	 t          |           } n# t          $ r& t          d|  dt          |            d|           w xY w|t          u rO| dk    s| dk    s| dk    rd} nG| d	k    s| d
k    s| dk    rd} n2t          d|  dt          |            d|           J d|             | S )zConvert the given value to a convert type.

    If the given val is None, it will just return None without the conversion.

    It supports,
        str -> int/float/bool
        int -> int
        bool -> bool
        float -> float
    NzFailed to convert a value z	 of type z to Falsefalse0FTruetrue1TzUnsupported convert type )typeint
ValueErrorfloatbool)r   r   s     g/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/ray/util/state/util.pyconvert_string_to_typer      s    {t	cl	"	"
				c((CC 	 	 	XSXX499XX,XX  	 
			**CC 	 	 	XSXX499XX,XX  	 
		'>>SG^^sczzCCF]]cVmmsczzCCXSXX499XX,XX   	A@,@@@@uJs   2 0A"/A? ?0B/c                  v    dd l } ddlm}m} |                     dt
                      ||j        d           d S )Nr   )TagKeyrecord_extra_usage_tagzRay state API is no longer experimental. Please import from `ray.util.state`. instead. Importing from `ray.experimental` will be deprecated in future releases. r   )warningsray._common.usage.usage_libr   r   warnDeprecationWarningEXPERIMENTAL_STATE_API_IMPORT)r   r   r   s      r   "record_deprecated_state_api_importr   2   sa    OOOJJJJJJJJMM	 		   6?EEEEE    N)	typingr   r   strr   r   r   r   r    r   r   <module>r#      s    " " " " " " " "+	%S%-.	/+?DS%QUEU?V+
3t+ + + +\F F F F Fr   