





from typing import Optional

from .. import Features, NamedSplit
from ..packaged_modules.text.text import Text
from ..utils.typing import NestedDataStructureLike, PathLike
from .abc import AbstractDatasetReader





class 					A_					(   A__						):







       """simple docstring"""





       def __init__(     self						:						Optional[int]    ,__A						:						Any    ,__A						:						Union[str, Any] = None    ,__A						:						str = None    ,__A						:						Dict = None    ,__A						:						List[str] = False    ,__A						:						Dict = False    ,__A						:						List[Any] = None    ,**__A						:						Optional[int]    ,)    ->       Dict:
         super().__init__(
             a__    ,split=a__    ,features=a__    ,cache_dir=a__    ,keep_in_memory=a__    ,streaming=a__    ,num_proc=a__    ,**a__    ,)
         _lowercase						    =			path_or_paths if isinstance(a__    ,a__	) else {self.split: path_or_paths}
         _lowercase						    =			Text(
             cache_dir=a__    ,data_files=a__    ,features=a__    ,**a__    ,)







       def  __UpperCAmelCase			(     self						:						Optional[Any]	)    ->       str:
         # Build iterable dataset
         if self.streaming:
           _lowercase						    =			self.builder.as_streaming_dataset(split=self.split	)
         # Build regular (map-style) dataset
         else:
           _lowercase						    =			None
           _lowercase						    =			None
           _lowercase						    =			None
           _lowercase						    =			None

           self.builder.download_and_prepare(
               download_config=a__    ,download_mode=a__    ,verification_mode=a__    ,base_path=a__    ,num_proc=self.num_proc    ,)
           _lowercase						    =			self.builder.as_dataset(
               split=self.split    ,verification_mode=a__    ,in_memory=self.keep_in_memory	)
         return dataset




from ...configuration_utils import PretrainedConfig
from ...utils import logging


_lowercase    	=		logging.get_logger(__name__)



class      _UpperCAmelCase      (							A__  ):
     UpperCamelCase__		     =					'''timm_backbone'''




     def __init__(					self			,    a__=None			,    a__=3			,    a__=True			,    a__=True			,    a__=None			,    **a__			,    ):
         super().__init__(**a__)
         A__					=       backbone
         A__					=       num_channels
         A__					=       features_only
         A__					=       use_pretrained_backbone
         A__					=       True
         A__					=       out_indices if out_indices is not None else (-1,)
