





from unittest import TestCase

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

class SCREAMING_SNAKE_CASE_ (					lowercase_   ):





					"""simple docstring"""


					def 					__magic_name__ ( self	):
										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 					__magic_name__ ( self	):
										lowerCamelCase__       =       {"col_1": [3, 2, 1, 0], "col_2": ["a", "b", "c", "d"]}
										return Dataset.from_dict(_lowerCAmelCase	)





					def 					__magic_name__ ( self	):
										lowerCamelCase__       =       self._create_example_records()
										lowerCamelCase__       =       Dataset.from_list(_lowerCAmelCase	)
										self.assertListEqual(dset.column_names	,  ["col_1", "col_2"]	)
										for i, r in enumerate(_lowerCAmelCase	):
															self.assertDictEqual(_lowerCAmelCase	,  example_records[i]	)





					def 					__magic_name__ ( self	):
										lowerCamelCase__       =       self._create_example_records()
										lowerCamelCase__       =       Dataset.from_list(_lowerCAmelCase	)
										lowerCamelCase__       =       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 					__magic_name__ ( self	):  # checks what happens with missing columns
										lowerCamelCase__       =       [{"col_1": 1}, {"col_2": "x"}]
										lowerCamelCase__       =       Dataset.from_list(_lowerCAmelCase	)
										self.assertDictEqual(dset[0]	,  {"col_1": 1}	)
										self.assertDictEqual(dset[1]	,  {"col_1": None}	)  # NB: first record is used for columns





					def 					__magic_name__ ( self	):  # checks if the type can be inferred from the second record
										lowerCamelCase__       =       [{"col_1": []}, {"col_1": [1, 2]}]
										lowerCamelCase__       =       Dataset.from_list(_lowerCAmelCase	)
										self.assertEqual(dset.info.features["col_1"]	,  Sequence(Value("int64"	)	)	)






					def 					__magic_name__ ( self	):
										lowerCamelCase__       =       Dataset.from_list([]	)
										self.assertEqual(len(_lowerCAmelCase	)	,  0	)
										self.assertListEqual(dset.column_names	,  []	)








def    __UpperCamelCase      (    a = 100) ->int:
					lowerCamelCase__       =       (n * (n + 1) // 2) ** 2
					lowerCamelCase__       =       n * (n + 1) * (2 * n + 1) // 6
					return sum_cubes - sum_squares


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

