



'''simple docstring'''







import unittest

from transformers import load_tool
from transformers.tools.agent_types import AGENT_TYPE_MAPPING

from .test_tools_common import ToolTesterMixin, output_types

class    lowerCamelCase_				(						unittest.TestCase       ,     lowerCAmelCase__	):






   '''simple docstring'''

   def 						_UpperCamelCase							(	self			):
       UpperCamelCase__	     =      load_tool("translation"			)
       self.tool.setup()
       UpperCamelCase__	     =      load_tool("translation"  ,    remote=lowerCAmelCase__			)


   def 						_UpperCamelCase							(	self			):
       UpperCamelCase__	     =      self.tool("Hey, what\'s up?"  ,    src_lang="English"  ,    tgt_lang="French"			)
       self.assertEqual(lowerCAmelCase__  ,    "- Hé, comment ça va?"			)


   def 						_UpperCamelCase							(	self			):
       UpperCamelCase__	     =      self.remote_tool("Hey, what\'s up?"  ,    src_lang="English"  ,    tgt_lang="French"			)
       self.assertEqual(lowerCAmelCase__  ,    "- Hé, comment ça va?"			)


   def 						_UpperCamelCase							(	self			):
       UpperCamelCase__	     =      self.tool(text="Hey, what\'s up?"  ,    src_lang="English"  ,    tgt_lang="French"			)
       self.assertEqual(lowerCAmelCase__  ,    "- Hé, comment ça va?"			)


   def 						_UpperCamelCase							(	self			):
       UpperCamelCase__	     =      self.remote_tool(text="Hey, what\'s up?"  ,    src_lang="English"  ,    tgt_lang="French"			)
       self.assertEqual(lowerCAmelCase__  ,    "- Hé, comment ça va?"			)


   def 						_UpperCamelCase							(	self			):
       UpperCamelCase__	     =      ["Hey, what\'s up?", "English", "Spanish"]
       UpperCamelCase__	     =      self.tool(*lowerCAmelCase__			)

       # There is a single output
       if len(self.tool.outputs			) == 1:
           UpperCamelCase__	     =      [outputs]

       self.assertListEqual(output_types(lowerCAmelCase__			)  ,    self.tool.outputs			)


   def 						_UpperCamelCase							(	self			):
       UpperCamelCase__	     =      ["Hey, what\'s up?", "English", "Spanish"]
       UpperCamelCase__	     =      self.tool(*lowerCAmelCase__			)

       if not isinstance(lowerCAmelCase__  ,    lowerCAmelCase__			):
           UpperCamelCase__	     =      [outputs]

       self.assertEqual(len(lowerCAmelCase__			)  ,    len(self.tool.outputs			)			)

       for output, output_type in zip(lowerCAmelCase__  ,    self.tool.outputs			):
           UpperCamelCase__	     =      AGENT_TYPE_MAPPING[output_type]
           self.assertTrue(isinstance(lowerCAmelCase__  ,    lowerCAmelCase__			)			)







   def 						_UpperCamelCase							(	self			):
       UpperCamelCase__	     =      ["Hey, what\'s up?", "English", "Spanish"]

       UpperCamelCase__	     =      []

       for _input, input_type in zip(lowerCAmelCase__  ,    self.tool.inputs			):
           if isinstance(lowerCAmelCase__  ,    lowerCAmelCase__			):
               _inputs.append([AGENT_TYPE_MAPPING[_input_type](_input			) for _input_type in input_type]			)
           else:
               _inputs.append(AGENT_TYPE_MAPPING[input_type](_input			)			)

        # Should not raise an error
       UpperCamelCase__	     =      self.tool(*lowerCAmelCase__			)

       if not isinstance(lowerCAmelCase__  ,    lowerCAmelCase__			):
           UpperCamelCase__	     =      [outputs]

       self.assertEqual(len(lowerCAmelCase__			)  ,    len(self.tool.outputs			)			)





"""simple docstring"""


from math import factorial







def    UpperCAmelCase       (						UpperCAmelCase		,   UpperCAmelCase   )							-> List[str]:
     return factorial(UpperCAmelCase   ) / (factorial(UpperCAmelCase   ) * factorial(n - r   ))







def    UpperCAmelCase       (						)							-> Optional[Any]:
     snake_case_   			=   0

     for i in range(1		,   101   ):
          for j in range(1		,   i + 1   ):
               if combinations(UpperCAmelCase		,   UpperCAmelCase   ) > 1e6:
                    total += 1
     return total


if __name__ == "__main__":
    print(solution())

