"""simple docstring"""







from ...processing_utils import ProcessorMixin
from ...tokenization_utils_base import BatchEncoding






class      _SCREAMING_SNAKE_CASE							(			UpperCAmelCase				):



   '''simple docstring'''



   __UpperCAmelCase	:							Any    =    ["image_processor", "tokenizer"]
   __UpperCAmelCase	:							int    =    "EfficientNetImageProcessor"
   __UpperCAmelCase	:							List[str]    =    ("BertTokenizer", "BertTokenizerFast")







   def __init__(	self ,				_SCREAMING_SNAKE_CASE ,				_SCREAMING_SNAKE_CASE	):


      '''simple docstring'''

      super().__init__(_SCREAMING_SNAKE_CASE ,				_SCREAMING_SNAKE_CASE	)







   def __call__(	self ,				_SCREAMING_SNAKE_CASE=None ,				_SCREAMING_SNAKE_CASE=None ,				_SCREAMING_SNAKE_CASE="max_length" ,				_SCREAMING_SNAKE_CASE=64 ,				_SCREAMING_SNAKE_CASE=None ,				**_SCREAMING_SNAKE_CASE	):


      '''simple docstring'''

      if text is None and images is None:
         raise ValueError('You have to specify either text or images. Both cannot be none.'	)

      if text is not None:
         __lowerCamelCase    		=					self.tokenizer(
             _SCREAMING_SNAKE_CASE ,				padding=_SCREAMING_SNAKE_CASE ,				max_length=_SCREAMING_SNAKE_CASE ,				return_tensors=_SCREAMING_SNAKE_CASE ,				**_SCREAMING_SNAKE_CASE	)

      if images is not None:
         __lowerCamelCase    		=					self.image_processor(_SCREAMING_SNAKE_CASE ,				return_tensors=_SCREAMING_SNAKE_CASE ,				**_SCREAMING_SNAKE_CASE	)

      if text is not None and images is not None:
         __lowerCamelCase    		=					image_features.pixel_values
         return encoding
      elif text is not None:
         return encoding
      else:
         return BatchEncoding(data=dict(**_SCREAMING_SNAKE_CASE	) ,				tensor_type=_SCREAMING_SNAKE_CASE	)







   def    _A				(	self ,				*_SCREAMING_SNAKE_CASE ,				**_SCREAMING_SNAKE_CASE	):


      '''simple docstring'''

      return self.tokenizer.batch_decode(*_SCREAMING_SNAKE_CASE ,				**_SCREAMING_SNAKE_CASE	)







   def    _A				(	self ,				*_SCREAMING_SNAKE_CASE ,				**_SCREAMING_SNAKE_CASE	):


      '''simple docstring'''

      return self.tokenizer.decode(*_SCREAMING_SNAKE_CASE ,				**_SCREAMING_SNAKE_CASE	)







   @property
   def    _A				(	self	):


      '''simple docstring'''

      __lowerCamelCase    		=					self.tokenizer.model_input_names
      __lowerCamelCase    		=					self.image_processor.model_input_names
      return list(dict.fromkeys(tokenizer_input_names + image_processor_input_names	)	)







"""simple docstring"""







from collections import Counter



def       A__    (	lowercase_     :	list[int]						)  ->							int:
   return sum(socks_by_color // 2 for socks_by_color in Counter(lowercase_						).values()						)


if __name__ == "__main__":
     import doctest

     doctest.testmod()

     _SCREAMING_SNAKE_CASE	:		int   =   [int(x) for x in input('''Enter socks by color :''').rstrip().split()]
     print(F"sock_merchant({colors}) = {sock_merchant(colors)}")






