





"""simple docstring"""
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 					_SCREAMING_SNAKE_CASE(   A  ):




       def __init__(						self		,SCREAMING_SNAKE_CASE__		,SCREAMING_SNAKE_CASE__ = None		,SCREAMING_SNAKE_CASE__ = None		,SCREAMING_SNAKE_CASE__ = None		,SCREAMING_SNAKE_CASE__ = False		,SCREAMING_SNAKE_CASE__ = False		,SCREAMING_SNAKE_CASE__ = None		,**SCREAMING_SNAKE_CASE__		,)			->      Any:





             """simple docstring"""






             super().__init__(
                 SCREAMING_SNAKE_CASE__		,split=SCREAMING_SNAKE_CASE__		,features=SCREAMING_SNAKE_CASE__		,cache_dir=SCREAMING_SNAKE_CASE__		,keep_in_memory=SCREAMING_SNAKE_CASE__		,streaming=SCREAMING_SNAKE_CASE__		,num_proc=SCREAMING_SNAKE_CASE__		,**SCREAMING_SNAKE_CASE__		,)
             __SCREAMING_SNAKE_CASE   :Optional[int]						=  path_or_paths if isinstance(SCREAMING_SNAKE_CASE__		,SCREAMING_SNAKE_CASE__							) else {self.split: path_or_paths}
             __SCREAMING_SNAKE_CASE   :str						=  Text(
                 cache_dir=SCREAMING_SNAKE_CASE__		,data_files=SCREAMING_SNAKE_CASE__		,features=SCREAMING_SNAKE_CASE__		,**SCREAMING_SNAKE_CASE__		,)




       def     _UpperCamelCase     (						self							)			->      List[Any]:





             """simple docstring"""






             if self.streaming:
                   __SCREAMING_SNAKE_CASE   :Optional[int]						=  self.builder.as_streaming_dataset(split=self.split							)
             # Build regular (map-style) dataset
             else:
                   __SCREAMING_SNAKE_CASE   :Optional[int]						=  None
                   __SCREAMING_SNAKE_CASE   :Union[str, Any]						=  None
                   __SCREAMING_SNAKE_CASE   :str						=  None
                   __SCREAMING_SNAKE_CASE   :List[Any]						=  None

                   self.builder.download_and_prepare(
                       download_config=SCREAMING_SNAKE_CASE__		,download_mode=SCREAMING_SNAKE_CASE__		,verification_mode=SCREAMING_SNAKE_CASE__		,base_path=SCREAMING_SNAKE_CASE__		,num_proc=self.num_proc		,)
                   __SCREAMING_SNAKE_CASE   :Optional[Any]						=  self.builder.as_dataset(
                       split=self.split		,verification_mode=SCREAMING_SNAKE_CASE__		,in_memory=self.keep_in_memory							)
             return dataset






"""simple docstring"""
from typing import Any



def      __lowerCamelCase   (							a_     :		list							)			->      list[Any]:
      if not input_list:
            return []
      __SCREAMING_SNAKE_CASE   :int						=  [input_list.count(a_							) for value in input_list]
      __SCREAMING_SNAKE_CASE   :str						=  max(a_							)  # Gets the maximum count in the input list.
      # Gets values of modes
      return sorted({input_list[i] for i, value in enumerate(a_							) if value == y}							)


if __name__ == "__main__":
  import doctest

  doctest.testmod()