




def    A						(__A   :    list[int]   ,				__A   :    int       )   ->      bool:







     """simple docstring"""


     UpperCAmelCase_          =							len(__A       )
     UpperCAmelCase_          =							[[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       ):
          UpperCAmelCase_          =							True

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

     for i in range(1   ,				arr_len + 1       ):
          for j in range(1   ,				required_sum + 1       ):
               if arr[i - 1] > j:
                    UpperCAmelCase_          =							subset[i - 1][j]
               if arr[i - 1] <= j:
                    UpperCAmelCase_          =							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()













import pytest
import requests

from datasets.utils.file_utils import http_head

from .utils import OfflineSimulationMode, RequestWouldHangIndefinitelyError, offline



@pytest.mark.integration
def 		A_				(     )						-> List[Any]:
 with offline(OfflineSimulationMode.CONNECTION_TIMES_OUT     ):
  with pytest.raises(_lowerCAmelCase     ):
   requests.request("GET"							,   "https://huggingface.co"     )
  with pytest.raises(requests.exceptions.ConnectTimeout     ):
   requests.request("GET"							,   "https://huggingface.co"							,   timeout=1.0     )



@pytest.mark.integration
def 		A_				(     )						-> Tuple:
 with offline(OfflineSimulationMode.CONNECTION_FAILS     ):
  with pytest.raises(requests.exceptions.ConnectionError     ):
   requests.request("GET"							,   "https://huggingface.co"     )



def 		A_				(     )						-> Optional[int]:
 with offline(OfflineSimulationMode.HF_DATASETS_OFFLINE_SET_TO_1     ):
  with pytest.raises(_lowerCAmelCase     ):
   http_head("https://huggingface.co"     )
