


"""simple docstring"""


import pytest

from datasets import inspect_metric, list_metrics, load_metric


@pytest.fixture
def _lowerCamelCase			(	_UpperCamelCase     :   Optional[Any]   ):

			'''simple docstring'''




			monkeypatch.setattr("datasets.utils.deprecation_utils._emitted_deprecation_warnings"					,				set()   )


@pytest.fixture
def _lowerCamelCase			(	_UpperCamelCase     :   str   ):

			'''simple docstring'''




			class 						_UpperCamelCase						:
										'''simple docstring'''







										def __init__(  self					,     __a			):
													__lowerCAmelCase       					=    metric_id
			class 						_UpperCamelCase						:
										'''simple docstring'''







										__UpperCAmelCase		:					Dict          =[MetricMock(_snake_case	) for metric_id in ["""accuracy""", """mse""", """precision""", """codeparrot/apps_metric"""]]

										def     snake_case       (  self			):
													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 _lowerCamelCase			(	_UpperCamelCase     :   List[str]					,				_UpperCamelCase     :   Union[str, Any]					,				_UpperCamelCase     :   Optional[int]					,				_UpperCamelCase     :   Tuple					,				_UpperCamelCase     :   Optional[int]   ):

			'''simple docstring'''




			if "tmp_path" in args:
						__lowerCAmelCase       					=    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   )








"""simple docstring"""


from itertools import product


def _lowerCamelCase			(	_UpperCamelCase					,				_UpperCamelCase   ):

			'''simple docstring'''




			__lowerCAmelCase       					=    sides_number
			__lowerCAmelCase       					=    max_face_number * dice_number
			__lowerCAmelCase       					=    [0] * (max_total + 1)

			__lowerCAmelCase       					=    1
			__lowerCAmelCase       					=    range(_UpperCamelCase					,				max_face_number + 1   )
			for dice_numbers in product(_UpperCamelCase					,				repeat=_UpperCamelCase   ):
						__lowerCAmelCase       					=    sum(_UpperCamelCase   )
						totals_frequencies[total] += 1

			return totals_frequencies


def _lowerCamelCase			(	):

			'''simple docstring'''




			__lowerCAmelCase       					=    total_frequency_distribution(
			    sides_number=4					,				dice_number=9   )
			__lowerCAmelCase       					=    total_frequency_distribution(
			    sides_number=6					,				dice_number=6   )

			__lowerCAmelCase       					=    0
			__lowerCAmelCase       					=    9
			__lowerCAmelCase       					=    4 * 9
			__lowerCAmelCase       					=    6
			for peter_total in range(_UpperCamelCase					,				max_peter_total + 1   ):
						peter_wins_count += peter_totals_frequencies[peter_total] * sum(
						    colin_totals_frequencies[min_colin_total:peter_total]   )

			__lowerCAmelCase       					=    (4**9) * (6**6)
			__lowerCAmelCase       					=    peter_wins_count / total_games_number

			__lowerCAmelCase       					=    round(_UpperCamelCase					,				ndigits=7   )

			return rounded_peter_win_probability


if __name__ == "__main__":
	print(f'''{solution() = }''')




