





'''simple docstring'''






import platform
from argparse import ArgumentParser

import huggingface_hub
import pandas
import pyarrow

from datasets import __version__ as version
from datasets.commands import BaseDatasetsCLICommand





def      lowercase  (  lowerCAmelCase :						Union[str, Any]):



				"""simple docstring"""


				return EnvironmentCommand()




class  lowerCamelCase__				(						snake_case_						):


	"""simple docstring"""





	@staticmethod
	def 				_lowerCamelCase				(					UpperCAmelCase__			)       ->				int:
					_A :				Optional[int]				=  parser.add_parser('''env'''   ,     help='''Print relevant system environment info.'''			)
					download_parser.set_defaults(func=UpperCAmelCase__			)




	def 				_lowerCamelCase				(					self			)       ->				Optional[int]:
					_A :				Optional[int]				=  {
					    '''`datasets` version''': version,
					    '''Platform''': platform.platform(),
					    '''Python version''': platform.python_version(),
					    '''Huggingface_hub version''': huggingface_hub.__version__,
					    '''PyArrow version''': pyarrow.__version__,
					    '''Pandas version''': pandas.__version__,
					}

					print('''\nCopy-and-paste the text below in your GitHub issue.\n'''			)
					print(self.format_dict(UpperCAmelCase__			)			)

					return info




	@staticmethod
	def 				_lowerCamelCase				(					UpperCAmelCase__			)       ->				List[Any]:
					return "\n".join([F"""- {prop}: {val}""" for prop, val in d.items()]			) + "\n"







'''simple docstring'''






from .hash_table import HashTable
from .number_theory.prime_numbers import is_prime, next_prime



class  lowerCamelCase__				(						snake_case_						):


	"""simple docstring"""





	def __init__(					self   ,     *UpperCAmelCase__   ,     **UpperCAmelCase__			)       ->				Optional[int]:
					super().__init__(*UpperCAmelCase__   ,     **UpperCAmelCase__			)




	def 				_lowerCamelCase				(					self   ,     UpperCAmelCase__   ,     UpperCAmelCase__			)       ->				Optional[int]:
					_A :				Union[str, Any]				=  (
					    next_prime(value % self.size_table			)
					    if not is_prime(value % self.size_table			)
					    else value % self.size_table
					)  # gt = bigger than
					return next_prime_gt - (data % next_prime_gt)




	def 				_lowerCamelCase				(					self   ,     UpperCAmelCase__   ,     UpperCAmelCase__   ,     UpperCAmelCase__			)       ->				Union[str, Any]:
					return (increment * self.__hash_function_a(UpperCAmelCase__   ,     UpperCAmelCase__			)) % self.size_table




	def 				_lowerCamelCase				(					self   ,     UpperCAmelCase__   ,     UpperCAmelCase__=None			)       ->				List[Any]:
					_A :				Optional[int]				=  1
					_A :				Optional[int]				=  self.hash_function(UpperCAmelCase__			)

					while self.values[new_key] is not None and self.values[new_key] != key:
									_A :				int				=  (
									    self.__hash_double_function(UpperCAmelCase__   ,     UpperCAmelCase__   ,     UpperCAmelCase__			)
									    if self.balanced_factor() >= self.lim_charge
									    else None
									)
									if new_key is None:
													break
									else:
													i += 1

					return new_key
