

from itertools import product



def  __lowerCAmelCase (  A = 15      ):
	UpperCAmelCase_    			=     0.0
	UpperCAmelCase_    			=     42
	UpperCAmelCase_    			=     42
	UpperCAmelCase_    			=     42
	UpperCAmelCase_    			=     42
	UpperCAmelCase_    			=     42
	UpperCAmelCase_    			=     42

	for series in product(range(2      )    ,       repeat=A      ):
		UpperCAmelCase_    			=     series.count(1      )
		UpperCAmelCase_    			=     num_turns - num_blue
		if num_red >= num_blue:
			continue
		UpperCAmelCase_    			=     1.0
		for ind, col in enumerate(A    ,       2      ):
			if col == 0:
				prob *= (ind - 1) / ind
			else:
				prob *= 1 / ind

		total_prob += prob

	return int(1 / total_prob      )


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


import unittest

from datasets import load_dataset

from transformers import load_tool

from .test_tools_common import ToolTesterMixin

class   __UpperCamelCase      (   unittest.TestCase       ,       lowercase  ):




	def  __A   (						self		:  str							):


		'''simple docstring'''







		UpperCAmelCase_    			=     load_tool("document-question-answering"							)
		self.tool.setup()
		UpperCAmelCase_    			=     load_tool("document-question-answering"						,		remote=lowerCAmelCase							)




	def  __A   (						self		:  Optional[Any]							):


		'''simple docstring'''







		UpperCAmelCase_    			=     load_dataset("hf-internal-testing/example-documents"						,		split="test"							)
		UpperCAmelCase_    			=     dataset[0]["image"]

		UpperCAmelCase_    			=     self.tool(lowerCAmelCase						,		"When is the coffee break?"							)
		self.assertEqual(lowerCAmelCase						,		"11-14 to 11:39 a.m."							)




	def  __A   (						self		:  Any							):


		'''simple docstring'''







		UpperCAmelCase_    			=     load_dataset("hf-internal-testing/example-documents"						,		split="test"							)
		UpperCAmelCase_    			=     dataset[0]["image"]

		UpperCAmelCase_    			=     self.remote_tool(lowerCAmelCase						,		"When is the coffee break?"							)
		self.assertEqual(lowerCAmelCase						,		"11-14 to 11:39 a.m."							)




	def  __A   (						self		:  int							):


		'''simple docstring'''







		UpperCAmelCase_    			=     load_dataset("hf-internal-testing/example-documents"						,		split="test"							)
		UpperCAmelCase_    			=     dataset[0]["image"]

		self.tool(document=lowerCAmelCase						,		question="When is the coffee break?"							)




	def  __A   (						self		:  Any							):


		'''simple docstring'''







		UpperCAmelCase_    			=     load_dataset("hf-internal-testing/example-documents"						,		split="test"							)
		UpperCAmelCase_    			=     dataset[0]["image"]

		UpperCAmelCase_    			=     self.remote_tool(document=lowerCAmelCase						,		question="When is the coffee break?"							)
		self.assertEqual(lowerCAmelCase						,		"11-14 to 11:39 a.m."							)