"""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 	_lowerCamelCase(	a				):
       __a       =    split_dict._to_yaml_list()
       assert len(a				) == len(a				)
       __a       =    SplitDict._from_yaml_list(a				)
       for split_name, split_info in split_dict.items():
              # dataset_name field is deprecated, and is therefore not part of the YAML dump
              __a       =    None
              # the split name of split_dict takes over the name of the split info object
              __a       =    split_name
       assert split_dict == reloaded




@pytest.mark.parametrize(
    "split_info"   ,    [SplitInfo(), SplitInfo(dataset_name=a				), SplitInfo(dataset_name="my_dataset"				)]				)
def 	_lowerCamelCase(	a				):
       # 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
       __a       =    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"""



def 	_lowerCamelCase(	a = 1   ,    a = 1_0_0_0				):
       __a       =    1
       __a       =    0

       for divide_by_number in range(a   ,    digit + 1				):
              __a       =    []
              __a       =    numerator
              for _ in range(1   ,    digit + 1				):
                     if now_divide in has_been_divided:
                            if longest_list_length < len(a				):
                                   __a       =    len(a				)
                                   __a       =    divide_by_number
                     else:
                            has_been_divided.append(a				)
                            __a       =    now_divide * 1_0 % divide_by_number

       return the_digit


# Tests
if __name__ == "__main__":
   import doctest

   doctest.testmod()
