from abc import ABC, abstractmethod
from typing import Optional, Union

from .. import Dataset, DatasetDict, Features, IterableDataset, IterableDatasetDict, NamedSplit
from ..utils.typing import NestedDataStructureLike, PathLike



class  UpperCamelCase				( __lowercase ):

     '''simple docstring'''

     def __init__(					self				,				A_ = None				,				A_ = None				,				A_ = None				,				A_ = None				,				A_ = False				,				A_ = False				,				A_ = None				,				**A_				,				) ->				str:






           """simple docstring"""
           _lowerCamelCase			    =				path_or_paths
           _lowerCamelCase			    =				split if split or isinstance(A_				,				A_						) else '''train'''
           _lowerCamelCase			    =				features
           _lowerCamelCase			    =				cache_dir
           _lowerCamelCase			    =				keep_in_memory
           _lowerCamelCase			    =				streaming
           _lowerCamelCase			    =				num_proc
           _lowerCamelCase			    =				kwargs





     @abstractmethod
     def 		UpperCamelCase_						(					self						) ->				Union[Dataset, DatasetDict, IterableDataset, IterableDatasetDict]:






           """simple docstring"""
           pass





class  UpperCamelCase				( __lowercase ):

     '''simple docstring'''

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






           """simple docstring"""
           _lowerCamelCase			    =				features
           _lowerCamelCase			    =				cache_dir
           _lowerCamelCase			    =				keep_in_memory
           _lowerCamelCase			    =				streaming
           _lowerCamelCase			    =				num_proc
           _lowerCamelCase			    =				kwargs





     @abstractmethod
     def 		UpperCamelCase_						(					self						) ->				Union[Dataset, IterableDataset]:






           """simple docstring"""
           pass
def       __magic_name__(  __UpperCAmelCase ,						__UpperCAmelCase		)						->    bool:



      '''simple docstring'''

      _lowerCamelCase			    =				len(__UpperCAmelCase		)
      _lowerCamelCase			    =				[[False] * (required_sum + 1) for _ in range(arr_len + 1		)]

      # for each arr value, a sum of zero(0) can be formed by not taking any element
      # hence True/1
      for i in range(arr_len + 1		):
            _lowerCamelCase			    =				True

      # sum is not zero and set is empty then false
      for i in range(1 ,						required_sum + 1		):
            _lowerCamelCase			    =				False

      for i in range(1 ,						arr_len + 1		):
            for j in range(1 ,						required_sum + 1		):
                  if arr[i - 1] > j:
                        _lowerCamelCase			    =				subset[i - 1][j]
                  if arr[i - 1] <= j:
                        _lowerCamelCase			    =				subset[i - 1][j] or subset[i - 1][j - arr[i - 1]]

      return subset[arr_len][required_sum]


if __name__ == "__main__":
     import doctest

     doctest.testmod()