o
    wi                     @   sD   d dl mZ d dlmZ dZdefddZdee defdd	Zd
S )    )Path)Optionalzs3://returnc                 C   s   t  |  d| S )z
    This function constructs an s3 address given a bucket and key.
    It has no reliance on any S3-related dependencies as the file pre-defines the S3 path prefix.
    /)S3_PATH_PREFIX)bucketkey r	   X/home/ubuntu/sommelier/.venv/lib/python3.10/site-packages/nemo/utils/s3_dirpath_utils.pybuild_s3_url   s   r   pathc                 C   s(   t | tr	t| } | duo|  tS )z
    This function checks if a path is an S3 url.
    It has no reliance on any S3-related dependencies as the file pre-defines the S3 path prefix.
    N)
isinstancer   strstrip
startswithr   )r   r	   r	   r
   	is_s3_url   s   
r   N)	pathlibr   typingr   r   r   r   boolr   r	   r	   r	   r
   <module>   s
   