





from __future__ import annotations

import random





class A_      :
   lowerCAmelCase__       =				6




   def __init__(self			:List[str]				)->      Tuple:
         __A      =       list(range(1					,     Dice.NUM_SIDES + 1				)				)






   def _lowerCAmelCase   (self			:Optional[int]				)->      List[Any]:
         return random.choice(self.sides				)





def _a       (			lowerCamelCase:     int      ,       lowerCamelCase:     int = 2				)			->		list[float]:







      '''simple docstring'''






      __A      =       [Dice() for i in range(lowerCamelCase				)]
      __A      =       [0] * (len(lowerCamelCase				) * Dice.NUM_SIDES + 1)
      for _ in range(lowerCamelCase				):
            count_of_sum[sum(dice.roll() for dice in dices				)] += 1
      __A      =       [round((count * 1_00) / num_throws      ,       2				) for count in count_of_sum]
      return probability[num_dice:]  # remove probability of sums that never appear


if __name__ == "__main__":
       import doctest

       doctest.testmod()












from unittest.mock import patch

import datasets
from datasets import Dataset



def _a       (			)			->		Optional[Any]:







      '''simple docstring'''






      __A      =       Dataset.from_dict({'''col_1''': [3, 2, 0, 1]}				)

      with patch('''tqdm.auto.tqdm'''				) as mock_tqdm:
            datasets.disable_progress_bar()
            dset.map(lambda lowerCamelCase				: {"col_2": x["col_1"] + 1}				)
            mock_tqdm.assert_not_called()

            mock_tqdm.reset_mock()

            datasets.enable_progress_bar()
            dset.map(lambda lowerCamelCase				: {"col_2": x["col_1"] + 1}				)
            mock_tqdm.assert_called()





