def download(media_type_or_url: Union[str, List[str]],
                 local_alias: Optional[str] = None,
                 file_type: Literal['compressed', 'file', 'sharded'] = 'compressed'):
        """Download and extract a resource from a http link.

        Args:
            media_type_or_url: `str` or List or `str`, Either belongs to the `media_type_urls`
                listed in the class field, or a remote url to download and extract.
                Be aware that, this media type or url needs to contain a zip or tar file.
            local_alias: `Options[str]`, The local alias name for the `media_type_or_url`. If the first arg is a
                media_type listed in this class, local_alias can leave None. else please pass in a name for the url.
                The local dir contains the extracted files will be: {cache_dir}/{local_alias}
            file_type: The file type, if is a compressed file, un-compressed the file,
                if is an original file, only download it, if is a sharded file, download all files and extract.

        Returns:
            The local dir contains the extracted files.
        """
        media_file = media_type_or_url if isinstance(media_type_or_url, str) else media_type_or_url[0]
        with safe_ddp_context(hash_id=media_file):
            return MediaResource._safe_download(
                media_type=media_type_or_url, media_name=local_alias, file_type=file_type)
Download and extract a resource from a http link.

        Args:
            media_type_or_url: `str` or List or `str`, Either belongs to the `media_type_urls`
                listed in the class field, or a remote url to download and extract.
                Be aware that, this media type or url needs to contain a zip or tar file.
            local_alias: `Options[str]`, The local alias name for the `media_type_or_url`. If the first arg is a
                media_type listed in this class, local_alias can leave None. else please pass in a name for the url.
                The local dir contains the extracted files will be: {cache_dir}/{local_alias}
            file_type: The file type, if is a compressed file, un-compressed the file,
                if is an original file, only download it, if is a sharded file, download all files and extract.

        Returns:
            The local dir contains the extracted files.
        
swift/llm/dataset/media.py