'''simple docstring'''




from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


_lowercase						: Tuple						=						{
    "configuration_bridgetower": [
        "BRIDGETOWER_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "BridgeTowerConfig",
        "BridgeTowerTextConfig",
        "BridgeTowerVisionConfig",
    ],
    "processing_bridgetower": ["BridgeTowerProcessor"],
}

try:
						if not is_vision_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_lowercase						: str						=						["BridgeTowerImageProcessor"]

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_lowercase						: str						=						[
						    "BRIDGETOWER_PRETRAINED_MODEL_ARCHIVE_LIST",
						    "BridgeTowerForContrastiveLearning",
						    "BridgeTowerForImageAndTextRetrieval",
						    "BridgeTowerForMaskedLM",
						    "BridgeTowerModel",
						    "BridgeTowerPreTrainedModel",
						]


if TYPE_CHECKING:
						from .configuration_bridgetower import (
						    BRIDGETOWER_PRETRAINED_CONFIG_ARCHIVE_MAP,
						    BridgeTowerConfig,
						    BridgeTowerTextConfig,
						    BridgeTowerVisionConfig,
						)
						from .processing_bridgetower import BridgeTowerProcessor

						try:
												if not is_vision_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .image_processing_bridgetower import BridgeTowerImageProcessor

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_bridgetower import (
												    BRIDGETOWER_PRETRAINED_MODEL_ARCHIVE_LIST,
												    BridgeTowerForContrastiveLearning,
												    BridgeTowerForImageAndTextRetrieval,
												    BridgeTowerForMaskedLM,
												    BridgeTowerModel,
												    BridgeTowerPreTrainedModel,
												)


else:
						import sys

						_lowercase						: int						=						_LazyModule(__name__, globals()["__file__"], _import_structure)






'''simple docstring'''




from itertools import product




def 							lowerCamelCase	(      UpperCAmelCase__       :					int      ,      UpperCAmelCase__       :					int )			->      list[int]:
							lowercase_					:			List[Any]										=       sides_number
							lowercase_					:			Dict										=       max_face_number * dice_number
							lowercase_					:			List[str]										=       [0] * (max_total + 1)

							lowercase_					:			Union[str, Any]										=       1
							lowercase_					:			Dict										=       range(UpperCAmelCase__      ,      max_face_number + 1 )
							for dice_numbers in product(UpperCAmelCase__      ,      repeat=UpperCAmelCase__ ):
														lowercase_					:			Any										=       sum(UpperCAmelCase__ )
														totals_frequencies[total] += 1

							return totals_frequencies




def 							lowerCamelCase	(      )			->      float:
							lowercase_					:			Optional[Any]										=       total_frequency_distribution(
							    sides_number=4      ,      dice_number=9 )
							lowercase_					:			List[str]										=       total_frequency_distribution(
							    sides_number=6      ,      dice_number=6 )

							lowercase_					:			Union[str, Any]										=       0
							lowercase_					:			Tuple										=       9
							lowercase_					:			Optional[int]										=       4 * 9
							lowercase_					:			List[Any]										=       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] )

							lowercase_					:			str										=       (4**9) * (6**6)
							lowercase_					:			List[Any]										=       peter_wins_count / total_games_number

							lowercase_					:			Dict										=       round(UpperCAmelCase__      ,      ndigits=7 )

							return rounded_peter_win_probability


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





