




"""simple docstring"""




import unittest
from dataclasses import dataclass
from typing import Optional

from transformers.utils import ModelOutput

@dataclass
class        UpperCAmelCase_  (	_UpperCAmelCase						):
		UpperCamelCase									=42
		UpperCamelCase									=None
		UpperCamelCase									=None


class        UpperCAmelCase_  (	unittest.TestCase						):
		def 					_lowerCamelCase    (		self   )		->   Tuple:
					__lowercase	:       int				=   ModelOutputTest(a=30   )
					self.assertEqual(x.a							,		30   )
					self.assertIsNone(x.b   )
					self.assertIsNone(x.c   )
					with self.assertRaises(lowercase__   ):
								__lowercase	:       str				=   x.d
		def 					_lowerCamelCase    (		self   )		->   Any:
					__lowercase	:       List[str]				=   ModelOutputTest(a=30							,		b=10   )
					self.assertEqual(x[0]							,		30   )
					self.assertEqual(x[1]							,		10   )
					self.assertEqual(x[:2]							,		(30, 10)   )
					self.assertEqual(x[:]							,		(30, 10)   )

					__lowercase	:       Tuple				=   ModelOutputTest(a=30							,		c=10   )
					self.assertEqual(x[0]							,		30   )
					self.assertEqual(x[1]							,		10   )
					self.assertEqual(x[:2]							,		(30, 10)   )
					self.assertEqual(x[:]							,		(30, 10)   )
		def 					_lowerCamelCase    (		self   )		->   Dict:
					__lowercase	:       List[Any]				=   ModelOutputTest(a=30							,		b=10   )
					self.assertEqual(x['''a''']							,		30   )
					self.assertEqual(x['''b''']							,		10   )
					with self.assertRaises(lowercase__   ):
								__lowercase	:       Union[str, Any]				=   x["c"]

					__lowercase	:       List[str]				=   ModelOutputTest(a=30							,		c=10   )
					self.assertEqual(x['''a''']							,		30   )
					self.assertEqual(x['''c''']							,		10   )
					with self.assertRaises(lowercase__   ):
								__lowercase	:       int				=   x["b"]
		def 					_lowerCamelCase    (		self   )		->   List[Any]:
					__lowercase	:       List[Any]				=   ModelOutputTest(a=30   )
					self.assertEqual(list(x.keys()   )							,		['''a''']   )
					self.assertEqual(list(x.values()   )							,		[30]   )
					self.assertEqual(list(x.items()   )							,		[('''a''', 30)]   )
					self.assertEqual(list(lowercase__   )							,		['''a''']   )

					__lowercase	:       List[Any]				=   ModelOutputTest(a=30							,		b=10   )
					self.assertEqual(list(x.keys()   )							,		['''a''', '''b''']   )
					self.assertEqual(list(x.values()   )							,		[30, 10]   )
					self.assertEqual(list(x.items()   )							,		[('''a''', 30), ('''b''', 10)]   )
					self.assertEqual(list(lowercase__   )							,		['''a''', '''b''']   )

					__lowercase	:       List[str]				=   ModelOutputTest(a=30							,		c=10   )
					self.assertEqual(list(x.keys()   )							,		['''a''', '''c''']   )
					self.assertEqual(list(x.values()   )							,		[30, 10]   )
					self.assertEqual(list(x.items()   )							,		[('''a''', 30), ('''c''', 10)]   )
					self.assertEqual(list(lowercase__   )							,		['''a''', '''c''']   )

					with self.assertRaises(lowercase__   ):
								__lowercase	:       str				=   x.update({'''d''': 20}   )
					with self.assertRaises(lowercase__   ):
								del x["a"]
					with self.assertRaises(lowercase__   ):
								__lowercase	:       Optional[int]				=   x.pop('''a'''   )
					with self.assertRaises(lowercase__   ):
								__lowercase	:       List[Any]				=   x.setdefault('''d'''							,		32   )
		def 					_lowerCamelCase    (		self   )		->   Any:
					__lowercase	:       Optional[int]				=   ModelOutputTest(a=30   )
					__lowercase	:       int				=   10
					self.assertEqual(x.a							,		10   )
					self.assertEqual(x['''a''']							,		10   )
		def 					_lowerCamelCase    (		self   )		->   Optional[Any]:
					__lowercase	:       Tuple				=   ModelOutputTest(a=30   )
					__lowercase	:       Dict				=   10
					self.assertEqual(x.a							,		10   )
					self.assertEqual(x['''a''']							,		10   )
		def 					_lowerCamelCase    (		self   )		->   List[Any]:
					__lowercase	:       Optional[Any]				=   ModelOutputTest({'''a''': 30, '''b''': 10}   )
					self.assertEqual(list(x.keys()   )							,		['''a''', '''b''']   )
					self.assertEqual(x.a							,		30   )
					self.assertEqual(x.b							,		10   )
		def 					_lowerCamelCase    (		self   )		->   List[str]:
					__lowercase	:       Tuple				=   ModelOutputTest([('''a''', 30), ('''b''', 10)]   )
					self.assertEqual(list(x.keys()   )							,		['''a''', '''b''']   )
					self.assertEqual(x.a							,		30   )
					self.assertEqual(x.b							,		10   )

					with self.assertRaises(lowercase__   ):
								__lowercase	:       Union[str, Any]				=   ModelOutputTest([('''a''', 30), (10, 10)]   )

					__lowercase	:       List[str]				=   ModelOutputTest(a=(30, 30)   )
					self.assertEqual(list(x.keys()   )							,		['''a''']   )
					self.assertEqual(x.a							,		(30, 30)   )









"""simple docstring"""




from collections import defaultdict







def       __UpperCAmelCase      (				__UpperCamelCase					):
			__lowercase	:       defaultdict[str, int]				=   defaultdict(__UpperCamelCase					)
			# Creating a dictionary containing count of each word
			for word in sentence.split():
						occurrence[word] += 1
			return occurrence


if __name__ == "__main__":
			for word, count in word_occurrence('INPUT STRING').items():
						print(F"{word}: {count}")



