
from unittest import TestCase

from datasets import Sequence, Value
from datasets.arrow_dataset import Dataset



class 		UpperCamelCase__  (       __lowercase    ):
   def       lowerCAmelCase			(self :					List[Any]   ):
    return [
        {"col_1": 3, "col_2": "a"},
        {"col_1": 2, "col_2": "b"},
        {"col_1": 1, "col_2": "c"},
        {"col_1": 0, "col_2": "d"},
    ]
   def       lowerCAmelCase			(self :					int   ):
    __a :  Dict						=  {'''col_1''': [3, 2, 1, 0], '''col_2''': ['''a''', '''b''', '''c''', '''d''']}
    return Dataset.from_dict(snake_case_   )
   def       lowerCAmelCase			(self :					Union[str, Any]   ):
    __a :  Tuple						=  self._create_example_records()
    __a :  str						=  Dataset.from_list(snake_case_   )
    self.assertListEqual(dset.column_names					,				['''col_1''', '''col_2''']   )
    for i, r in enumerate(snake_case_   ):
     self.assertDictEqual(snake_case_					,				example_records[i]   )
   def       lowerCAmelCase			(self :					int   ):
    __a :  List[str]						=  self._create_example_records()
    __a :  Union[str, Any]						=  Dataset.from_list(snake_case_   )
    __a :  str						=  Dataset.from_dict({k: [r[k] for r in example_records] for k in example_records[0]}   )
    self.assertEqual(dset.info					,				dset_from_dict.info   )
   def       lowerCAmelCase			(self :					Tuple   ):  # checks what happens with missing columns
    __a :  Any						=  [{'''col_1''': 1}, {'''col_2''': '''x'''}]
    __a :  Any						=  Dataset.from_list(snake_case_   )
    self.assertDictEqual(dset[0]					,				{'''col_1''': 1}   )
    self.assertDictEqual(dset[1]					,				{'''col_1''': None}   )  # NB: first record is used for columns
   def       lowerCAmelCase			(self :					str   ):  # checks if the type can be inferred from the second record
    __a :  Dict						=  [{'''col_1''': []}, {'''col_1''': [1, 2]}]
    __a :  List[Any]						=  Dataset.from_list(snake_case_   )
    self.assertEqual(dset.info.features['''col_1''']					,				Sequence(Value('''int64'''   )   )   )







   def       lowerCAmelCase			(self :					str   ):
    __a :  Tuple						=  Dataset.from_list([]   )
    self.assertEqual(len(snake_case_   )					,				0   )
    self.assertListEqual(dset.column_names					,				[]   )


def    __UpperCamelCase     (				lowerCAmelCase__							:				int = 5_0_0_0_0_0_0_0  ):
 __a :  int						=  set()
 __a :  str						=  int((limit - 2_4) ** (1 / 2)  )

 __a :  int						=  set(range(3  ,   prime_square_limit + 1  ,   2  )  )
 primes.add(2  )
 for p in range(3  ,   prime_square_limit + 1  ,   2  ):
  if p not in primes:
   continue
  primes.difference_update(set(range(p * p  ,   prime_square_limit + 1  ,   lowerCAmelCase__  )  )  )

 for primea in primes:
  __a :  Union[str, Any]						=  primea * primea
  for primea in primes:
   __a :  Union[str, Any]						=  primea * primea * primea
   if square + cube >= limit - 1_6:
    break
   for primea in primes:
    __a :  int						=  primea * primea * primea * primea
    __a :  Union[str, Any]						=  square + cube + tetr
    if total >= limit:
     break
    ret.add(lowerCAmelCase__  )

 return len(lowerCAmelCase__  )


if __name__ == "__main__":
      print(F"""{solution() = }""")
