





'''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=1337			,     num_examples=42			,     dataset_name="my_dataset"       )}       ),
        SplitDict({"train": SplitInfo(name="train"			,     num_bytes=1337			,     num_examples=42       )}       ),
        SplitDict({"train": SplitInfo()}       ),
    ]			,     )
def 	UpperCAmelCase_							(					__lowercase							:      SplitDict       )		->       int:


     '''simple docstring'''



     _UpperCAmelCase     							=   split_dict._to_yaml_list()
     assert len(__lowercase       ) == len(__lowercase       )
     _UpperCAmelCase     							=   SplitDict._from_yaml_list(__lowercase       )
     for split_name, split_info in split_dict.items():
          # dataset_name field is deprecated, and is therefore not part of the YAML dump
          _UpperCAmelCase     							=   None
          # the split name of split_dict takes over the name of the split info object
          _UpperCAmelCase     							=   split_name
     assert split_dict == reloaded






@pytest.mark.parametrize(
    "split_info"			,     [SplitInfo(), SplitInfo(dataset_name=__lowercase       ), SplitInfo(dataset_name="my_dataset"       )]       )
def 	UpperCAmelCase_							(					__lowercase							:      List[Any]       )		->       Dict:


     '''simple docstring'''



     _UpperCAmelCase     							=   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 	UpperCAmelCase_							(					__lowercase							:      str       )		->       list:


     '''simple docstring'''



     if n_term == "":
          return []
     _UpperCAmelCase     							=   []
     for temp in range(int(__lowercase       )       ):
          series.append(f'1/{temp + 1}' if series else "1"       )
     return series


if __name__ == "__main__":
  __SCREAMING_SNAKE_CASE     :str       =				input('''Enter the last number (nth term) of the Harmonic Series''')
  print('''Formula of Harmonic Series => 1+1/2+1/3 ..... 1/n''')
  print(harmonic_series(nth_term))




