




'''simple docstring'''







from typing import List, Optional

import numpy as np

from ...processing_utils import ProcessorMixin
from ...utils import to_numpy

class 	_snake_case(			UpperCAmelCase      ):
 __snake_case:							Optional[int]						=					'''EncodecFeatureExtractor'''
 __snake_case:							Tuple						=					('''T5Tokenizer''', '''T5TokenizerFast''')






 def __init__(self       :  str    ,		a       :  Union[str, Any]    ,		a       :  int    )       ->   List[Any]:






    """simple docstring"""


    super().__init__(a    ,		a    )
    A__       =     self.feature_extractor
    A__       =     False






 def 						_UpperCamelCase (self       :  Tuple    ,		a       :  str=None    ,		a       :  List[Any]=None    ,		a       :  List[str]=True    )       ->   Any:






    """simple docstring"""


    return self.tokenizer.get_decoder_prompt_ids(task=a    ,		language=a    ,		no_timestamps=a    )






 def __call__(self       :  Union[str, Any]    ,		*a       :  int    ,		**a       :  List[str]    )       ->   Optional[Any]:






    """simple docstring"""


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

    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 text is not None:
       A__       =     self.tokenizer(a    ,		**a    )

    if audio is not None:
       A__       =     self.feature_extractor(a    ,		*a    ,		sampling_rate=a    ,		**a    )

    if audio is None:
       return inputs

    elif text is None:
       return audio_inputs

    else:
       A__       =     audio_inputs['input_values']
       if "padding_mask" in audio_inputs:
          A__       =     audio_inputs['padding_mask']
       return inputs






 def 						_UpperCamelCase (self       :  Tuple    ,		*a       :  Dict    ,		**a       :  Optional[Any]    )       ->   Dict:






    """simple docstring"""


    A__       =     kwargs.pop('audio'    ,		a    )
    A__       =     kwargs.pop('padding_mask'    ,		a    )

    if len(a    ) > 0:
       A__       =     args[0]
       A__       =     args[1:]

    if audio_values is not None:
       return self._decode_audio(a    ,		padding_mask=a    )
    else:
       return self.tokenizer.batch_decode(*a    ,		**a    )






 def 						_UpperCamelCase (self       :  List[Any]    ,		*a       :  Tuple    ,		**a       :  Optional[Any]    )       ->   Union[str, Any]:






    """simple docstring"""


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






 def 						_UpperCamelCase (self       :  Tuple    ,		a       :  List[Any]    ,		a       :  Optional = None    )       ->   List[np.ndarray]:






    """simple docstring"""


    A__       =     to_numpy(a    )
    A__  ,			A__  ,			A__       =     audio_values.shape

    if padding_mask is None:
       return list(a    )

    A__       =     to_numpy(a    )

    # match the sequence length of the padding mask to the generated audio arrays by padding with the **non-padding**
    # token (so that the generated audio values are **not** treated as padded tokens)
    A__       =     seq_len - padding_mask.shape[-1]
    A__       =     1 - self.feature_extractor.padding_value
    A__       =     np.pad(a    ,		((0, 0), (0, difference))    ,		'constant'    ,		constant_values=a    )

    A__       =     audio_values.tolist()
    for i in range(a    ):
       A__       =     np.asarray(audio_values[i]    )[
           padding_mask[i][None, :] != self.feature_extractor.padding_value
       ]
       A__       =     sliced_audio.reshape(a    ,		-1    )

    return audio_values








'''simple docstring'''







def 						_A      ( ):






   '''simple docstring'''







   A__       =     [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]

   A__       =     6
   A__       =     1
   A__       =     1901

   A__       =     0

   while year < 2001:
      day += 7

      if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0):
         if day > days_per_month[month - 1] and month != 2:
            month += 1
            A__       =     day - days_per_month[month - 2]
         elif day > 29 and month == 2:
            month += 1
            A__       =     day - 29
      else:
         if day > days_per_month[month - 1]:
            month += 1
            A__       =     day - days_per_month[month - 2]

      if month > 12:
         year += 1
         A__       =     1

      if year < 2001 and day == 1:
         sundays += 1
   return sundays


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


