





"""simple docstring"""


import warnings
from contextlib import contextmanager

from ...processing_utils import ProcessorMixin



class      lowercase_				(     _SCREAMING_SNAKE_CASE							):
       snake_case__				:							str											=     'AutoFeatureExtractor'
       snake_case__				:							List[Any]											=     'Speech2Text2Tokenizer'

       def __init__(			self   ,					__SCREAMING_SNAKE_CASE   ,					__SCREAMING_SNAKE_CASE     ):






        '''simple docstring'''

        super().__init__(UpperCamelCase__   ,					UpperCamelCase__     )
        snake_case__    							=				self.feature_extractor
        snake_case__    							=				False

       def __call__(			self   ,					*__SCREAMING_SNAKE_CASE   ,					**__SCREAMING_SNAKE_CASE     ):






        '''simple docstring'''

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

        if "raw_speech" in kwargs:
         warnings.warn("Using `raw_speech` as a keyword argument is deprecated. Use `audio` instead."     )
         snake_case__    							=				kwargs.pop("raw_speech"     )
        else:
         snake_case__    							=				kwargs.pop("audio"   ,					UpperCamelCase__     )
        snake_case__    							=				kwargs.pop("sampling_rate"   ,					UpperCamelCase__     )
        snake_case__    							=				kwargs.pop("text"   ,					UpperCamelCase__     )
        if len(UpperCamelCase__     ) > 0:
         snake_case__    							=				args[0]
         snake_case__    							=				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:
         snake_case__    							=				self.feature_extractor(UpperCamelCase__   ,					*UpperCamelCase__   ,					sampling_rate=UpperCamelCase__   ,					**UpperCamelCase__     )
        if text is not None:
         snake_case__    							=				self.tokenizer(UpperCamelCase__   ,					**UpperCamelCase__     )

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

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






        '''simple docstring'''

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

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






        '''simple docstring'''

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

       @contextmanager
       def 		_SCREAMING_SNAKE_CASE(			self     ):






        '''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."     )
        snake_case__    							=				True
        snake_case__    							=				self.tokenizer
        yield
        snake_case__    							=				self.feature_extractor
        snake_case__    							=				False








"""simple docstring"""


from math import sqrt





def 							a__			(  _UpperCAmelCase	)    ->  list[int]:

 '''simple docstring'''






 snake_case__    							=				[1]
 for i in range(2	,     int(sqrt(_UpperCAmelCase	)	) + 1	,     1	):
  if number % i == 0:
   values.append(_UpperCAmelCase	)
   if int(number // i	) != i:
    values.append(int(number // i	)	)
 return sorted(_UpperCAmelCase	)





def 							a__			(  _UpperCAmelCase	)    ->  bool:

 '''simple docstring'''






 return sum(factors(_UpperCAmelCase	)	) > n





def 							a__			(  _UpperCAmelCase	)    ->  bool:

 '''simple docstring'''






 snake_case__    							=				factors(_UpperCAmelCase	)
 snake_case__    							=				len(_UpperCAmelCase	)
 snake_case__    							=				[[0 for i in range(number + 1	)] for j in range(r + 1	)]
 for i in range(r + 1	):
  snake_case__    							=				True

 for i in range(1	,     number + 1	):
  snake_case__    							=				False

 for i in range(1	,     r + 1	):
  for j in range(1	,     number + 1	):
   if j < values[i - 1]:
    snake_case__    							=				subset[i - 1][j]
   else:
    snake_case__    							=				subset[i - 1][j] or subset[i - 1][j - values[i - 1]]

 return subset[r][number] != 0





def 							a__			(  _UpperCAmelCase	)    ->  bool:

 '''simple docstring'''






 return abundant(_UpperCAmelCase	) and not semi_perfect(_UpperCAmelCase	)


if __name__ == "__main__":
   import doctest

   doctest.testmod(verbose=True)
   for number in (6_9, 7_0, 7_1):
      print(f'''{number} is {'' if weird(number) else 'not '}weird.''')

