
import math

def      A (       A_							:					int       ):
						assert isinstance(SCREAMING_SNAKE_CASE_    ,							SCREAMING_SNAKE_CASE_       ) and (
						    number >= 0
						), "'number' must been an int and positive"

						if 1 < number < 4:
												# 2 and 3 are primes
												return True
						elif number < 2 or not number % 2:
												# Negatives, 0, 1 and all even numbers are not primes
												return False

						snake_case       :     Optional[Any] =    range(3    ,							int(math.sqrt(SCREAMING_SNAKE_CASE_       ) + 1       )    ,							2       )
						return not any(not number % i for i in odd_numbers       )





def      A (       A_							:					Tuple    ,							A_							:					Union[str, Any]=1    ,							**A_							:					List[Any]       ):
						snake_case       :     Tuple =    factor * value
						snake_case       :     List[str] =    value

						while not is_prime(SCREAMING_SNAKE_CASE_       ):
												value += 1 if not ("desc" in kwargs and kwargs["desc"] is True) else -1

						if value == first_value_val:
												return next_prime(value + 1    ,							**SCREAMING_SNAKE_CASE_       )
						return value



'''simple docstring'''





import pytest

from datasets import inspect_metric, list_metrics, load_metric

@pytest.fixture
def      A (       A_							:					str       ):
						monkeypatch.setattr('''datasets.utils.deprecation_utils._emitted_deprecation_warnings'''    ,							set()       )

@pytest.fixture
def      A (       A_							:					Optional[Any]       ):

						class 						a   :




										def __init__(							self	:				List[str],    SCREAMING_SNAKE_CASE_	:				Optional[Any]      ):
																snake_case       :     List[str] =    metric_id




						class 						a   :
										_snake_case		    = [MetricMock(__magic_name__    ) for metric_id in ['''accuracy''', '''mse''', '''precision''', '''codeparrot/apps_metric''']]




										def 	__snake_case							(							self	:				str      ):
																return self._metrics




						monkeypatch.setattr('''datasets.inspect.huggingface_hub'''    ,							HfhMock()       )





@pytest.mark.parametrize(
    '''func, args'''    ,							[(load_metric, ('''metrics/mse''',)), (list_metrics, ()), (inspect_metric, ('''metrics/mse''', '''tmp_path'''))]       )
def      A (       A_							:					str    ,							A_							:					Dict    ,							A_							:					int    ,							A_							:					int    ,							A_							:					str       ):
						if "tmp_path" in args:
												snake_case       :     List[str] =    tuple(arg if arg != '''tmp_path''' else tmp_path for arg in args       )
						with pytest.warns(A_    ,							match='''https://huggingface.co/docs/evaluate'''       ):
												func(*A_       )

