



"""simple docstring"""
import os
import re
from shutil import copyfile
from typing import Any, Dict, List, Optional, Tuple

import sentencepiece as spm

from ...tokenization_utils import AddedToken, PreTrainedTokenizer
from ...utils import logging


_UpperCAmelCase   =	logging.get_logger(__name__)

_UpperCAmelCase   =	{"""vocab_file""": """spiece.model"""}

_UpperCAmelCase   =	{
    """vocab_file""": {
        """google/bigbird-roberta-base""": """https://huggingface.co/google/bigbird-roberta-base/resolve/main/spiece.model""",
        """google/bigbird-roberta-large""": (
            """https://huggingface.co/google/bigbird-roberta-large/resolve/main/spiece.model"""
        ),
        """google/bigbird-base-trivia-itc""": (
            """https://huggingface.co/google/bigbird-base-trivia-itc/resolve/main/spiece.model"""
        ),
    }
}

_UpperCAmelCase   =	{
    """google/bigbird-roberta-base""": 4_0_9_6,
    """google/bigbird-roberta-large""": 4_0_9_6,
    """google/bigbird-base-trivia-itc""": 4_0_9_6,
}
class     a		(     __A				):
  UpperCamelCase		: Any     =    VOCAB_FILES_NAMES
  UpperCamelCase		: List[Any]     =    PRETRAINED_VOCAB_FILES_MAP
  UpperCamelCase		: Optional[int]     =    PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
  UpperCamelCase		: Tuple     =    ['input_ids', 'attention_mask']
  UpperCamelCase		: Any     =    []



  def __init__(  self       :    str				,						lowerCAmelCase       :    Dict				,						lowerCAmelCase       :    Tuple="<unk>"				,						lowerCAmelCase       :    Union[str, Any]="<s>"				,						lowerCAmelCase       :    int="</s>"				,						lowerCAmelCase       :    List[Any]="<pad>"				,						lowerCAmelCase       :    Tuple="[SEP]"				,						lowerCAmelCase       :    int="[MASK]"				,						lowerCAmelCase       :    Optional[int]="[CLS]"				,						lowerCAmelCase       :    Optional[Dict[str, Any]] = None				,						**lowerCAmelCase       :    int				,						)   ->    None:


     '''simple docstring'''




     SCREAMING_SNAKE_CASE_:       Tuple   	=AddedToken(lowerCAmelCase_				,						lstrip=lowerCAmelCase_				,						rstrip=lowerCAmelCase_						) if isinstance(lowerCAmelCase_				,						lowerCAmelCase_						) else bos_token
     SCREAMING_SNAKE_CASE_:       Tuple   	=AddedToken(lowerCAmelCase_				,						lstrip=lowerCAmelCase_				,						rstrip=lowerCAmelCase_						) if isinstance(lowerCAmelCase_				,						lowerCAmelCase_						) else eos_token
     SCREAMING_SNAKE_CASE_:       Optional[int]   	=AddedToken(lowerCAmelCase_				,						lstrip=lowerCAmelCase_				,						rstrip=lowerCAmelCase_						) if isinstance(lowerCAmelCase_				,						lowerCAmelCase_						) else unk_token
     SCREAMING_SNAKE_CASE_:       List[str]   	=AddedToken(lowerCAmelCase_				,						lstrip=lowerCAmelCase_				,						rstrip=lowerCAmelCase_						) if isinstance(lowerCAmelCase_				,						lowerCAmelCase_						) else pad_token
     SCREAMING_SNAKE_CASE_:       Any   	=AddedToken(lowerCAmelCase_				,						lstrip=lowerCAmelCase_				,						rstrip=lowerCAmelCase_						) if isinstance(lowerCAmelCase_				,						lowerCAmelCase_						) else cls_token
     SCREAMING_SNAKE_CASE_:       int   	=AddedToken(lowerCAmelCase_				,						lstrip=lowerCAmelCase_				,						rstrip=lowerCAmelCase_						) if isinstance(lowerCAmelCase_				,						lowerCAmelCase_						) else sep_token

     # Mask token behave like a normal word, i.e. include the space before it
     SCREAMING_SNAKE_CASE_:       Any   	=AddedToken(lowerCAmelCase_				,						lstrip=lowerCAmelCase_				,						rstrip=lowerCAmelCase_						) if isinstance(lowerCAmelCase_				,						lowerCAmelCase_						) else mask_token

     SCREAMING_SNAKE_CASE_:       Tuple   	={} if sp_model_kwargs is None else sp_model_kwargs

     super().__init__(
         bos_token=lowerCAmelCase_				,						eos_token=lowerCAmelCase_				,						unk_token=lowerCAmelCase_				,						pad_token=lowerCAmelCase_				,						sep_token=lowerCAmelCase_				,						mask_token=lowerCAmelCase_				,						cls_token=lowerCAmelCase_				,						sp_model_kwargs=self.sp_model_kwargs				,						**lowerCAmelCase_				,						)

     SCREAMING_SNAKE_CASE_:       Any   	=vocab_file

     SCREAMING_SNAKE_CASE_:       Union[str, Any]   	=spm.SentencePieceProcessor(**self.sp_model_kwargs						)
     self.sp_model.Load(lowerCAmelCase_						)



  @property
  def 		lowerCamelCase__				(  self       :    Union[str, Any]						)   ->    Optional[int]:


     '''simple docstring'''




     return self.sp_model.get_piece_size()



  def 		lowerCamelCase__				(  self       :    str						)   ->    Tuple:


     '''simple docstring'''




     SCREAMING_SNAKE_CASE_:       Any   	={self.convert_ids_to_tokens(lowerCAmelCase_						): i for i in range(self.vocab_size						)}
     vocab.update(self.added_tokens_encoder						)
     return vocab



  def __getstate__(  self       :    int						)   ->    List[str]:


     '''simple docstring'''




     SCREAMING_SNAKE_CASE_:       List[Any]   	=self.__dict__.copy()
     SCREAMING_SNAKE_CASE_:       List[Any]   	=None
     return state



  def __setstate__(  self       :    int				,						lowerCAmelCase       :    Optional[Any]						)   ->    str:


     '''simple docstring'''




     SCREAMING_SNAKE_CASE_:       str   	=d

     # for backward compatibility
     if not hasattr(self				,						"""sp_model_kwargs"""						):
        SCREAMING_SNAKE_CASE_:       Tuple   	={}

     SCREAMING_SNAKE_CASE_:       Optional[int]   	=spm.SentencePieceProcessor(**self.sp_model_kwargs						)
     self.sp_model.Load(self.vocab_file						)



  def 		lowerCamelCase__				(  self       :    List[str]				,						lowerCAmelCase       :    str						)   ->    List[str]:


     '''simple docstring'''




     return self.sp_model.encode(lowerCAmelCase_				,						out_type=lowerCAmelCase_						)



  def 		lowerCamelCase__				(  self       :    Union[str, Any]				,						lowerCAmelCase       :    Any						)   ->    int:


     '''simple docstring'''




     return self.sp_model.piece_to_id(lowerCAmelCase_						)



  def 		lowerCamelCase__				(  self       :    int				,						lowerCAmelCase       :    Any						)   ->    Optional[Any]:


     '''simple docstring'''




     SCREAMING_SNAKE_CASE_:       List[str]   	=self.sp_model.IdToPiece(lowerCAmelCase_						)
     return token



  def 		lowerCamelCase__				(  self       :    Any				,						lowerCAmelCase       :    Dict						)   ->    Union[str, Any]:


     '''simple docstring'''




     SCREAMING_SNAKE_CASE_:       Optional[int]   	=[]
     SCREAMING_SNAKE_CASE_:       List[str]   	=""
     SCREAMING_SNAKE_CASE_:       int   	=False
     for token in tokens:
        # make sure that special tokens are not decoded using sentencepiece model
        if token in self.all_special_tokens:
           if not prev_is_special:
              out_string += " "
           out_string += self.sp_model.decode(lowerCAmelCase_						) + token
           SCREAMING_SNAKE_CASE_:       Dict   	=True
           SCREAMING_SNAKE_CASE_:       str   	=[]
        else:
           current_sub_tokens.append(lowerCAmelCase_						)
           SCREAMING_SNAKE_CASE_:       Union[str, Any]   	=False
     out_string += self.sp_model.decode(lowerCAmelCase_						)
     return out_string.strip()



  def 		lowerCamelCase__				(  self       :    Union[str, Any]				,						lowerCAmelCase       :    List[int]				,						lowerCAmelCase       :    bool = False				,						lowerCAmelCase       :    bool = None				,						lowerCAmelCase       :    bool = True				,						**lowerCAmelCase       :    Optional[Any]				,						)   ->    str:


     '''simple docstring'''




     SCREAMING_SNAKE_CASE_:       Any   	=kwargs.pop("""use_source_tokenizer"""				,						lowerCAmelCase_						)

     SCREAMING_SNAKE_CASE_:       int   	=self.convert_ids_to_tokens(lowerCAmelCase_				,						skip_special_tokens=lowerCAmelCase_						)

     # To avoid mixing byte-level and unicode for byte-level BPT
     # we need to build string separately for added tokens and byte-level tokens
     # cf. https://github.com/huggingface/transformers/issues/1133
     SCREAMING_SNAKE_CASE_:       int   	=[]
     SCREAMING_SNAKE_CASE_:       List[Any]   	=[]
     for token in filtered_tokens:
        if skip_special_tokens and token in self.all_special_ids:
           continue
        if token in self.added_tokens_encoder:
           if current_sub_text:
              sub_texts.append(self.convert_tokens_to_string(lowerCAmelCase_						)						)
              SCREAMING_SNAKE_CASE_:       Tuple   	=[]
           sub_texts.append(lowerCAmelCase_						)
        else:
           current_sub_text.append(lowerCAmelCase_						)
     if current_sub_text:
        sub_texts.append(self.convert_tokens_to_string(lowerCAmelCase_						)						)

     # Mimic the behavior of the Rust tokenizer:
     # No space before [MASK] and [SEP]
     if spaces_between_special_tokens:
        SCREAMING_SNAKE_CASE_:       List[str]   	=re.sub(R""" (\[(MASK|SEP)\])"""				,						R"""\1"""				,						""" """.join(lowerCAmelCase_						)						)
     else:
        SCREAMING_SNAKE_CASE_:       Optional[Any]   	="".join(lowerCAmelCase_						)

     SCREAMING_SNAKE_CASE_:       Dict   	=(
         clean_up_tokenization_spaces
         if clean_up_tokenization_spaces is not None
         else self.clean_up_tokenization_spaces
     )
     if clean_up_tokenization_spaces:
        SCREAMING_SNAKE_CASE_:       str   	=self.clean_up_tokenization(lowerCAmelCase_						)
        return clean_text
     else:
        return text



  def 		lowerCamelCase__				(  self       :    Tuple				,						lowerCAmelCase       :    str				,						lowerCAmelCase       :    Optional[str] = None						)   ->    Tuple[str]:


     '''simple docstring'''




     if not os.path.isdir(lowerCAmelCase_						):
        logger.error(f'''Vocabulary path ({save_directory}) should be a directory'''						)
        return
     SCREAMING_SNAKE_CASE_:       Any   	=os.path.join(
         lowerCAmelCase_				,						(filename_prefix + """-""" if filename_prefix else """""") + VOCAB_FILES_NAMES["""vocab_file"""]						)

     if os.path.abspath(self.vocab_file						) != os.path.abspath(lowerCAmelCase_						) and os.path.isfile(self.vocab_file						):
        copyfile(self.vocab_file				,						lowerCAmelCase_						)
     elif not os.path.isfile(self.vocab_file						):
        with open(lowerCAmelCase_				,						"""wb"""						) as fi:
           SCREAMING_SNAKE_CASE_:       int   	=self.sp_model.serialized_model_proto()
           fi.write(lowerCAmelCase_						)

     return (out_vocab_file,)



  def 		lowerCamelCase__				(  self       :    Optional[Any]				,						lowerCAmelCase       :    List[int]				,						lowerCAmelCase       :    Optional[List[int]] = None						)   ->    List[int]:


     '''simple docstring'''




     if token_ids_a is None:
        return [self.cls_token_id] + token_ids_a + [self.sep_token_id]
     SCREAMING_SNAKE_CASE_:       Tuple   	=[self.cls_token_id]
     SCREAMING_SNAKE_CASE_:       Dict   	=[self.sep_token_id]
     return cls + token_ids_a + sep + token_ids_a + sep



  def 		lowerCamelCase__				(  self       :    Tuple				,						lowerCAmelCase       :    List[int]				,						lowerCAmelCase       :    Optional[List[int]] = None				,						lowerCAmelCase       :    bool = False						)   ->    List[int]:


     '''simple docstring'''




     if already_has_special_tokens:
        return super().get_special_tokens_mask(
            token_ids_a=lowerCAmelCase_				,						token_ids_a=lowerCAmelCase_				,						already_has_special_tokens=lowerCAmelCase_						)

     if token_ids_a is None:
        return [1] + ([0] * len(lowerCAmelCase_						)) + [1]
     return [1] + ([0] * len(lowerCAmelCase_						)) + [1] + ([0] * len(lowerCAmelCase_						)) + [1]





  def 		lowerCamelCase__				(  self       :    Dict				,						lowerCAmelCase       :    List[int]				,						lowerCAmelCase       :    Optional[List[int]] = None						)   ->    List[int]:


     '''simple docstring'''




     SCREAMING_SNAKE_CASE_:       List[str]   	=[self.sep_token_id]
     SCREAMING_SNAKE_CASE_:       Tuple   	=[self.cls_token_id]
     if token_ids_a is None:
        return len(cls + token_ids_a + sep						) * [0]
     return len(cls + token_ids_a + sep						) * [0] + len(token_ids_a + sep						) * [1]











"""simple docstring"""
# Lint as: python3
import os
import re
import urllib.parse
from pathlib import Path
from typing import Callable, List, Optional, Union
from zipfile import ZipFile

from ..utils.file_utils import cached_path, hf_github_url
from ..utils.logging import get_logger
from ..utils.version import Version


lowerCamelCase_					=      get_logger(__name__)







class 			UpperCamelCase_       :
	__magic_name__	      =				'''dummy_data'''
	__magic_name__	      =				'''datasets'''
	__magic_name__	      =				False





	def __init__(      self					: str	,	lowerCAmelCase_					: str	,	lowerCAmelCase_					: str	,	lowerCAmelCase_					: Union[Version, str]	,	lowerCAmelCase_					: Optional[str] = None	,	lowerCAmelCase_					: bool = False	,	lowerCAmelCase_					: bool = True	,	lowerCAmelCase_					: Optional[List[Callable]] = None	,	)						->			Tuple:
				UpperCAmelCase_     : Optional[int]			     =					0
				UpperCAmelCase_     : int			     =					dataset_name
				UpperCAmelCase_     : Optional[int]			     =					cache_dir
				UpperCAmelCase_     : Tuple			     =					use_local_dummy_data
				UpperCAmelCase_     : int			     =					config
				# download_callbacks take a single url as input
				UpperCAmelCase_     : List[Callable]			     =					download_callbacks or []
				# if False, it doesn't load existing files and it returns the paths of the dummy files relative
				# to the dummy_data zip file root
				UpperCAmelCase_     : Optional[Any]			     =					load_existing_dummy_data

				# TODO(PVP, QL) might need to make this more general
				UpperCAmelCase_     : Dict			     =					str(lowerCAmelCase_						)
				# to be downloaded
				UpperCAmelCase_     : Optional[Any]			     =					None
				UpperCAmelCase_     : int			     =					None





	@property
	def      _SCREAMING_SNAKE_CASE      (      self					: List[Any]						)						->			str:
				if self._dummy_file is None:
							UpperCAmelCase_     : List[str]			     =					self.download_dummy_data()
				return self._dummy_file





	@property
	def      _SCREAMING_SNAKE_CASE      (      self					: Tuple						)						->			int:
				if self.config is not None:
							# structure is dummy / config_name / version_name
							return os.path.join("dummy"	,	self.config.name	,	self.version_name						)
				# structure is dummy / version_name
				return os.path.join("dummy"	,	self.version_name						)





	@property
	def      _SCREAMING_SNAKE_CASE      (      self					: List[str]						)						->			Optional[int]:
				return os.path.join(self.dummy_data_folder	,	"dummy_data.zip"						)





	def      _SCREAMING_SNAKE_CASE      (      self					: List[str]						)						->			Tuple:
				UpperCAmelCase_     : int			     =					(
				    self.local_path_to_dummy_data if self.use_local_dummy_data is True else self.github_path_to_dummy_data
				)

				UpperCAmelCase_     : Union[str, Any]			     =					cached_path(
				    lowerCAmelCase_	,	cache_dir=self.cache_dir	,	extract_compressed_file=lowerCAmelCase_	,	force_extract=lowerCAmelCase_						)

				return os.path.join(lowerCAmelCase_	,	self.dummy_file_name						)





	@property
	def      _SCREAMING_SNAKE_CASE      (      self					: List[Any]						)						->			int:
				return os.path.join(self.datasets_scripts_dir	,	self.dataset_name	,	self.dummy_zip_file						)





	@property
	def      _SCREAMING_SNAKE_CASE      (      self					: Dict						)						->			Optional[Any]:
				if self._bucket_url is None:
							UpperCAmelCase_     : Union[str, Any]			     =					hf_github_url(self.dataset_name	,	self.dummy_zip_file.replace(os.sep	,	"/"						)						)
				return self._bucket_url





	@property
	def      _SCREAMING_SNAKE_CASE      (      self					: List[Any]						)						->			Optional[Any]:
				# return full path if its a dir
				if os.path.isdir(self.dummy_file						):
							return self.dummy_file
				# else cut off path to file -> example `xsum`.
				return "/".join(self.dummy_file.replace(os.sep	,	"/"						).split("/"						)[:-1]						)





	def      _SCREAMING_SNAKE_CASE      (      self					: Tuple	,	lowerCAmelCase_					: List[str]	,	*lowerCAmelCase_					: List[Any]						)						->			Optional[int]:
				if self.load_existing_dummy_data:
							# dummy data is downloaded and tested
							UpperCAmelCase_     : Dict			     =					self.dummy_file
				else:
							# dummy data cannot be downloaded and only the path to dummy file is returned
							UpperCAmelCase_     : Optional[int]			     =					self.dummy_file_name

				# special case when data_url is a dict
				if isinstance(lowerCAmelCase_	,	lowerCAmelCase_						):
							return self.create_dummy_data_dict(lowerCAmelCase_	,	lowerCAmelCase_						)
				elif isinstance(lowerCAmelCase_	,	(list, tuple)						):
							return self.create_dummy_data_list(lowerCAmelCase_	,	lowerCAmelCase_						)
				else:
							return self.create_dummy_data_single(lowerCAmelCase_	,	lowerCAmelCase_						)





	def      _SCREAMING_SNAKE_CASE      (      self					: Optional[int]	,	lowerCAmelCase_					: int	,	*lowerCAmelCase_					: Union[str, Any]						)						->			Any:
				return self.download_and_extract(lowerCAmelCase_						)





	def      _SCREAMING_SNAKE_CASE      (      self					: Dict	,	lowerCAmelCase_					: List[str]	,	lowerCAmelCase_					: Tuple						)						->			Any:
				return self.download_and_extract(lowerCAmelCase_						)





	def      _SCREAMING_SNAKE_CASE      (      self					: str	,	lowerCAmelCase_					: Union[str, Any]	,	*lowerCAmelCase_					: Tuple	,	**lowerCAmelCase_					: Tuple						)						->			Union[str, Any]:
				return path





	def      _SCREAMING_SNAKE_CASE      (      self					: List[str]						)						->			List[str]:
				return {}





	def      _SCREAMING_SNAKE_CASE      (      self					: Union[str, Any]	,	lowerCAmelCase_					: int	,	lowerCAmelCase_					: List[Any]						)						->			List[Any]:
				UpperCAmelCase_     : Dict			     =					{}
				for key, single_urls in data_url.items():
							for download_callback in self.download_callbacks:
										if isinstance(lowerCAmelCase_	,	lowerCAmelCase_						):
													for single_url in single_urls:
																download_callback(lowerCAmelCase_						)
										else:
													UpperCAmelCase_     : Tuple			     =					single_urls
													download_callback(lowerCAmelCase_						)
            # we force the name of each key to be the last file / folder name of the url path
            # if the url has arguments, we need to encode them with urllib.parse.quote_plus
							if isinstance(lowerCAmelCase_	,	lowerCAmelCase_						):
										UpperCAmelCase_     : List[str]			     =					[os.path.join(lowerCAmelCase_	,	urllib.parse.quote_plus(Path(lowerCAmelCase_						).name						)						) for x in single_urls]
							else:
										UpperCAmelCase_     : Optional[int]			     =					single_urls
										UpperCAmelCase_     : Optional[Any]			     =					os.path.join(lowerCAmelCase_	,	urllib.parse.quote_plus(Path(lowerCAmelCase_						).name						)						)
							UpperCAmelCase_     : int			     =					value

				# make sure that values are unique
				if all(isinstance(lowerCAmelCase_	,	lowerCAmelCase_						) for i in dummy_data_dict.values()						) and len(set(dummy_data_dict.values()						)						) < len(
				    dummy_data_dict.values()						):
							# append key to value to make its name unique
							UpperCAmelCase_     : List[str]			     =					{key: value + key for key, value in dummy_data_dict.items()}

				return dummy_data_dict





	def      _SCREAMING_SNAKE_CASE      (      self					: Union[str, Any]	,	lowerCAmelCase_					: List[Any]	,	lowerCAmelCase_					: Optional[int]						)						->			Dict:
				UpperCAmelCase_     : str			     =					[]
				# trick: if there are many shards named like `data.txt-000001-of-00300`, only use the first one
				UpperCAmelCase_     : int			     =					all(bool(re.findall("[0-9]{3,}-of-[0-9]{3,}"	,	lowerCAmelCase_						)						) for url in data_url						)
				UpperCAmelCase_     : Union[str, Any]			     =					all(
				    url.startswith("https://ftp.ncbi.nlm.nih.gov/pubmed/baseline/pubmed"						) for url in data_url						)
				if data_url and (is_tf_records or is_pubmed_records):
							UpperCAmelCase_     : Tuple			     =					[data_url[0]] * len(lowerCAmelCase_						)
				for single_url in data_url:
							for download_callback in self.download_callbacks:
										download_callback(lowerCAmelCase_						)
							# we force the name of each key to be the last file / folder name of the url path
							# if the url has arguments, we need to encode them with urllib.parse.quote_plus
							UpperCAmelCase_     : Dict			     =					os.path.join(lowerCAmelCase_	,	urllib.parse.quote_plus(single_url.split("/"						)[-1]						)						)
							dummy_data_list.append(lowerCAmelCase_						)
				return dummy_data_list





	def      _SCREAMING_SNAKE_CASE      (      self					: List[Any]	,	lowerCAmelCase_					: Optional[Any]	,	lowerCAmelCase_					: str						)						->			Optional[int]:
				for download_callback in self.download_callbacks:
							download_callback(lowerCAmelCase_						)
				# we force the name of each key to be the last file / folder name of the url path
				# if the url has arguments, we need to encode them with urllib.parse.quote_plus
				UpperCAmelCase_     : Optional[Any]			     =					os.path.join(lowerCAmelCase_	,	urllib.parse.quote_plus(data_url.split("/"						)[-1]						)						)
				if os.path.exists(lowerCAmelCase_						) or not self.load_existing_dummy_data:
							return value
				else:
							# Backward compatibility, maybe deprecate at one point.
							# For many datasets with single url calls to dl_manager.download_and_extract,
							# the dummy_data.zip file is actually the zipped downloaded file
							# while now we expected the dummy_data.zip file to be a directory containing
							# the downloaded file.
							return path_to_dummy_data





	def      _SCREAMING_SNAKE_CASE      (      self					: Optional[int]						)						->			int:
				pass





	def      _SCREAMING_SNAKE_CASE      (      self					: Any						)						->			Optional[int]:
				pass





	def      _SCREAMING_SNAKE_CASE      (      self					: Union[str, Any]	,	lowerCAmelCase_					: Dict						)						->			Optional[Any]:
				def _iter_archive_members(lowerCAmelCase_					: Dict						):
							# this preserves the order of the members inside the ZIP archive
							UpperCAmelCase_     : str			     =					Path(self.dummy_file						).parent
							UpperCAmelCase_     : Optional[Any]			     =					path.relative_to(lowerCAmelCase_						)
							with ZipFile(self.local_path_to_dummy_data						) as zip_file:
										UpperCAmelCase_     : str			     =					zip_file.namelist()
							for member in members:
										if member.startswith(relative_path.as_posix()						):
													yield dummy_parent_path.joinpath(lowerCAmelCase_						)

				UpperCAmelCase_     : Optional[Any]			     =					Path(lowerCAmelCase_						)
				UpperCAmelCase_     : List[Any]			     =					_iter_archive_members(lowerCAmelCase_						) if self.use_local_dummy_data else path.rglob("*"						)
				for file_path in file_paths:
							if file_path.is_file() and not file_path.name.startswith((".", "__")						):
										yield file_path.relative_to(lowerCAmelCase_						).as_posix(), file_path.open("rb"						)





	def      _SCREAMING_SNAKE_CASE      (      self					: Optional[Any]	,	lowerCAmelCase_					: Tuple						)						->			str:
				if not isinstance(lowerCAmelCase_	,	lowerCAmelCase_						):
							UpperCAmelCase_     : str			     =					[paths]
				for path in paths:
							if os.path.isfile(lowerCAmelCase_						):
										if os.path.basename(lowerCAmelCase_						).startswith((".", "__")						):
													return
										yield path
							else:
										for dirpath, dirnames, filenames in os.walk(lowerCAmelCase_						):
													if os.path.basename(lowerCAmelCase_						).startswith((".", "__")						):
																continue
													dirnames.sort()
													for filename in sorted(lowerCAmelCase_						):
																if filename.startswith((".", "__")						):
																			continue
																yield os.path.join(lowerCAmelCase_	,	lowerCAmelCase_						)



