

import os
from collections import namedtuple

import pytest

from datasets import ClassLabel, Features, Sequence, Value
from datasets.commands.test import TestCommand
from datasets.info import DatasetInfo, DatasetInfosDict


_UpperCAmelCase		:       Any						    =	namedtuple(
    """_TestCommandArgs""",
    [
        """dataset""",
        """name""",
        """cache_dir""",
        """data_dir""",
        """all_configs""",
        """save_infos""",
        """ignore_verifications""",
        """force_redownload""",
        """clear_cache""",
    ],
    defaults=[None, None, None, False, False, False, False, False],
)





def  __lowerCamelCase     (			UpperCamelCase__       ,							UpperCamelCase__				):







							'''simple docstring'''






							return (abs(source - target				) / target) < 0.01





@pytest.mark.integration
def  __lowerCamelCase     (			UpperCamelCase__				):







							'''simple docstring'''






							snake_case_          =   _TestCommandArgs(dataset=UpperCamelCase__       ,							all_configs=UpperCamelCase__       ,							save_infos=UpperCamelCase__				)
							snake_case_          =   TestCommand(*UpperCamelCase__				)
							test_command.run()
							snake_case_          =   os.path.join(UpperCamelCase__       ,							'README.md'				)
							assert os.path.exists(UpperCamelCase__				)
							snake_case_          =   DatasetInfosDict.from_directory(UpperCamelCase__				)
							snake_case_          =   DatasetInfosDict(
							    {
							        'default': DatasetInfo(
							            features=Features(
							                {
							                    'tokens': Sequence(Value('string'				)				),
							                    'ner_tags': Sequence(
							                        ClassLabel(names=['O', 'B-PER', 'I-PER', 'B-ORG', 'I-ORG', 'B-LOC', 'I-LOC']				)				),
							                    'langs': Sequence(Value('string'				)				),
							                    'spans': Sequence(Value('string'				)				),
							                }				)       ,							splits=[
							                {
							                    'name': 'train',
							                    'num_bytes': 2351563,
							                    'num_examples': 10000,
							                },
							                {
							                    'name': 'validation',
							                    'num_bytes': 238418,
							                    'num_examples': 1000,
							                },
							            ]       ,							download_size=3940680       ,							dataset_size=2589981       ,							)
							    }				)
							assert dataset_infos.keys() == expected_dataset_infos.keys()
							for key in DatasetInfo._INCLUDED_INFO_IN_YAML:
														snake_case_    ,   snake_case_          =   getattr(dataset_infos['default']       ,							UpperCamelCase__				), getattr(expected_dataset_infos['default']       ,							UpperCamelCase__				)
														if key == "num_bytes":
																					assert is_apercent_close(UpperCamelCase__       ,							UpperCamelCase__				)
														elif key == "splits":
																					assert list(UpperCamelCase__				) == list(UpperCamelCase__				)
																					for split in result:
																												assert result[split].name == expected[split].name
																												assert result[split].num_examples == expected[split].num_examples
																												assert is_apercent_close(result[split].num_bytes       ,							expected[split].num_bytes				)
														else:
																					result == expected







def  __lowerCamelCase     (			UpperCamelCase__				):







							'''simple docstring'''






							snake_case_          =   1
							snake_case_          =   2
							while i * i <= n:
														snake_case_          =   0
														while n % i == 0:
																					n //= i
																					multiplicity += 1
														n_divisors *= multiplicity + 1
														i += 1
							if n > 1:
														n_divisors *= 2
							return n_divisors





def  __lowerCamelCase     (			):







							'''simple docstring'''






							snake_case_          =   1
							snake_case_          =   1

							while True:
														i += 1
														t_num += i

														if count_divisors(UpperCamelCase__				) > 500:
																					break

							return t_num


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




