






"""simple docstring"""



import pytest

from datasets.splits import SplitDict, SplitInfo
from datasets.utils.py_utils import asdict



@pytest.mark.parametrize(
    '''split_dict'''		,					[
        SplitDict(),
        SplitDict({'''train''': SplitInfo(name='''train'''		,					num_bytes=1_3_3_7		,					num_examples=4_2		,					dataset_name='''my_dataset'''	)}	),
        SplitDict({'''train''': SplitInfo(name='''train'''		,					num_bytes=1_3_3_7		,					num_examples=4_2	)}	),
        SplitDict({'''train''': SplitInfo()}	),
    ]		,					)
def 						lowercase    (				__snake_case				: str	):
		lowercase_ : List[str]							       =   split_dict._to_yaml_list()
		assert len(UpperCamelCase_	) == len(UpperCamelCase_	)
		lowercase_ : Any							       =   SplitDict._from_yaml_list(UpperCamelCase_	)
		for split_name, split_info in split_dict.items():
				# dataset_name field is deprecated, and is therefore not part of the YAML dump
				lowercase_ : str							       =   None
				# the split name of split_dict takes over the name of the split info object
				lowercase_ : Dict							       =   split_name
		assert split_dict == reloaded






@pytest.mark.parametrize(
    '''split_info'''		,					[SplitInfo(), SplitInfo(dataset_name=UpperCamelCase_	), SplitInfo(dataset_name='''my_dataset'''	)]	)
def 						lowercase    (				__snake_case				: str	):
		# For backward compatibility, we need asdict(split_dict) to return split info dictrionaries with the "dataset_name"
		# field even if it's deprecated. This way old versionso of `datasets` can still reload dataset_infos.json files
		lowercase_ : Tuple							       =   asdict(SplitDict({'''train''': split_info}	)	)
		assert "dataset_name" in split_dict_asdict["train"]
		assert split_dict_asdict["train"]["dataset_name"] == split_info.dataset_name





"""simple docstring"""





from __future__ import annotations

from fractions import Fraction



def 						_lowerCAmelCase				(				UpperCamelCase_  ,				UpperCamelCase_				):
		return (
		    num != den and num % 10 == den // 10 and (num // 10) / (den % 10) == num / den
		)



def 						_lowerCAmelCase				(				UpperCamelCase_				):
		__SCREAMING_SNAKE_CASE            = []
		__SCREAMING_SNAKE_CASE            = 11
		__SCREAMING_SNAKE_CASE            = int("""1""" + """0""" * digit_len				)
		for num in range(UpperCamelCase_  ,				UpperCamelCase_				):
				while den <= 99:
						if (num != den) and (num % 10 == den // 10) and (den % 10 != 0):
								if is_digit_cancelling(UpperCamelCase_  ,				UpperCamelCase_				):
										solutions.append(f"{num}/{den}"				)
						den += 1
				num += 1
				__SCREAMING_SNAKE_CASE            = 10
		return solutions



def 						_lowerCAmelCase				(				UpperCamelCase_ = 2				):
		__SCREAMING_SNAKE_CASE            = 1.0
		for fraction in fraction_list(UpperCamelCase_				):
				__SCREAMING_SNAKE_CASE            = Fraction(UpperCamelCase_				)
				result *= frac.denominator / frac.numerator
		return int(UpperCamelCase_				)


if __name__ == "__main__":
							print(solution())




