

"""simple docstring"""


from unittest import TestCase

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

class      __a							(UpperCamelCase_):






     '''simple docstring'''

     def 					_a			(						self  )  ->      Union[str, Any]:


           """simple docstring"""


           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 					_a			(						self  )  ->      Any:


           """simple docstring"""


           SCREAMING_SNAKE_CASE__   :      Optional[int]      		=	{"""col_1""": [3, 2, 1, 0], """col_2""": ["""a""", """b""", """c""", """d"""]}
           return Dataset.from_dict(_a  )

     def 					_a			(						self  )  ->      Optional[Any]:


           """simple docstring"""


           SCREAMING_SNAKE_CASE__   :      str      		=	self._create_example_records()
           SCREAMING_SNAKE_CASE__   :      Tuple      		=	Dataset.from_list(_a  )
           self.assertListEqual(dset.column_names	,    ["""col_1""", """col_2"""]  )
           for i, r in enumerate(_a  ):
                 self.assertDictEqual(_a	,    example_records[i]  )

     def 					_a			(						self  )  ->      Any:


           """simple docstring"""


           SCREAMING_SNAKE_CASE__   :      List[str]      		=	self._create_example_records()
           SCREAMING_SNAKE_CASE__   :      Tuple      		=	Dataset.from_list(_a  )
           SCREAMING_SNAKE_CASE__   :      Any      		=	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 					_a			(						self  )  ->      Dict:  # checks what happens with missing columns


           """simple docstring"""


           SCREAMING_SNAKE_CASE__   :      List[str]      		=	[{"""col_1""": 1}, {"""col_2""": """x"""}]
           SCREAMING_SNAKE_CASE__   :      Optional[int]      		=	Dataset.from_list(_a  )
           self.assertDictEqual(dset[0]	,    {"""col_1""": 1}  )
           self.assertDictEqual(dset[1]	,    {"""col_1""": None}  )  # NB: first record is used for columns

     def 					_a			(						self  )  ->      str:  # checks if the type can be inferred from the second record


           """simple docstring"""


           SCREAMING_SNAKE_CASE__   :      Union[str, Any]      		=	[{"""col_1""": []}, {"""col_1""": [1, 2]}]
           SCREAMING_SNAKE_CASE__   :      List[str]      		=	Dataset.from_list(_a  )
           self.assertEqual(dset.info.features["""col_1"""]	,    Sequence(Value("""int64"""  )  )  )





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


           """simple docstring"""


           SCREAMING_SNAKE_CASE__   :      Union[str, Any]      		=	Dataset.from_list([]  )
           self.assertEqual(len(_a  )	,    0  )
           self.assertListEqual(dset.column_names	,    []  )







"""simple docstring"""


from math import sqrt




def  _lowercase					(    __lowerCAmelCase							)       ->				bool:

      if 1 < number < 4:
            # 2 and 3 are primes
            return True
      elif number < 2 or number % 2 == 0 or number % 3 == 0:
            # Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
            return False

      # All primes number are in format of 6k +/- 1
      for i in range(5  ,					int(sqrt(__lowerCAmelCase							) + 1							)  ,					6							):
            if number % i == 0 or number % (i + 2) == 0:
                  return False
      return True




def  _lowercase					(    __lowerCAmelCase = 1_0001							)       ->				int:
      SCREAMING_SNAKE_CASE__   :      Dict      		=	0
      SCREAMING_SNAKE_CASE__   :      Tuple      		=	1
      while count != nth and number < 3:
            number += 1
            if is_prime(__lowerCAmelCase							):
                  count += 1
      while count != nth:
            number += 2
            if is_prime(__lowerCAmelCase							):
                  count += 1
      return number


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




