



'''simple docstring'''





import warnings
from contextlib import contextmanager

from ....processing_utils import ProcessorMixin






class __A			(  __lowerCamelCase						):



 '''simple docstring'''







 __lowerCamelCase    :       str          =       'MCTCTFeatureExtractor'
 __lowerCamelCase    :       str          =       'AutoTokenizer'



 def __init__(self ,   A ,   A       )    ->     Dict:


      """simple docstring"""



      super().__init__(A ,   A       )
      _a      =  self.feature_extractor
      _a      =  False



 def __call__(self ,   *A ,   **A       )    ->     Any:


      """simple docstring"""



      if self._in_target_context_manager:
           return self.current_processor(*A ,   **A       )

      if "raw_speech" in kwargs:
           warnings.warn('''Using `raw_speech` as a keyword argument is deprecated. Use `audio` instead.'''       )
           _a      =  kwargs.pop('''raw_speech'''       )
      else:
           _a      =  kwargs.pop('''audio''' ,   A       )
      _a      =  kwargs.pop('''sampling_rate''' ,   A       )
      _a      =  kwargs.pop('''text''' ,   A       )
      if len(A       ) > 0:
           _a      =  args[0]
           _a      =  args[1:]

      if audio is None and text is None:
           raise ValueError('''You need to specify either an `audio` or `text` input to process.'''       )

      if audio is not None:
           _a      =  self.feature_extractor(A ,   *A ,   sampling_rate=A ,   **A       )
      if text is not None:
           _a      =  self.tokenizer(A ,   **A       )

      if text is None:
           return inputs
      elif audio is None:
           return encodings
      else:
           _a      =  encodings["""input_ids"""]
           return inputs



 def 					a__  (self ,   *A ,   **A       )    ->     List[str]:


      """simple docstring"""



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



 def 					a__  (self ,   *A ,   **A       )    ->     List[str]:


      """simple docstring"""



      if self._in_target_context_manager:
           return self.current_processor.pad(*A ,   **A       )

      _a      =  kwargs.pop('''input_features''' ,   A       )
      _a      =  kwargs.pop('''labels''' ,   A       )
      if len(A       ) > 0:
           _a      =  args[0]
           _a      =  args[1:]

      if input_features is not None:
           _a      =  self.feature_extractor.pad(A ,   *A ,   **A       )
      if labels is not None:
           _a      =  self.tokenizer.pad(A ,   **A       )

      if labels is None:
           return input_features
      elif input_features is None:
           return labels
      else:
           _a      =  labels["""input_ids"""]
           return input_features



 def 					a__  (self ,   *A ,   **A       )    ->     Optional[Any]:


      """simple docstring"""



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



 @contextmanager
 def 					a__  (self       )    ->     Any:


      """simple docstring"""



      warnings.warn(
          '''`as_target_processor` is deprecated and will be removed in v5 of Transformers. You can process your '''
          '''labels by using the argument `text` of the regular `__call__` method (either in the same call as '''
          '''your audio inputs, or in a separate call.'''       )
      _a      =  True
      _a      =  self.tokenizer
      yield
      _a      =  self.feature_extractor
      _a      =  False










from __future__ import annotations

import typing
from collections import Counter







def 			A__							(    SCREAMING_SNAKE_CASE__)   ->    typing.Counter[int]:
  __snake_case:						typing.Counter[int]   =						Counter()
  for base in range(1					,					max_perimeter + 1):
    for perpendicular in range(SCREAMING_SNAKE_CASE__					,					max_perimeter + 1):
      __snake_case:						Dict   =						(base * base + perpendicular * perpendicular) ** 0.5
      if hypotenuse == int(SCREAMING_SNAKE_CASE__):
        __snake_case:						Any   =						int(base + perpendicular + hypotenuse)
        if perimeter > max_perimeter:
          continue
        triplets[perimeter] += 1
  return triplets







def 			A__							(    SCREAMING_SNAKE_CASE__ = 1000)   ->    int:
  __snake_case:						List[str]   =						pythagorean_triple(SCREAMING_SNAKE_CASE__)
  return triplets.most_common(1)[0][0]


if __name__ == "__main__":
      print(f'Perimeter {solution()} has maximum solutions')






