

'''simple docstring'''

from hashlib import mda, shaaaa

UpperCAmelCase				   =  (shaaaa, mda)


class   lowerCAmelCase     :







       def __init__(							self			: Tuple						,      __lowercase			: int = 8      ):







            """simple docstring"""







            __lowercase					=0b0
            __lowercase					=size







       def 			snake_case   (							self			: Optional[int]						,      __lowercase			: str      ):







            """simple docstring"""







            __lowercase					=self.hash_(__lowercase      )
            self.bitarray |= h







       def 			snake_case   (							self			: Union[str, Any]						,      __lowercase			: str      ):







            """simple docstring"""







            __lowercase					=self.hash_(__lowercase      )
            return (h & self.bitarray) == h







       def __contains__(							self			: Optional[int]						,      __lowercase			: str      ):







            """simple docstring"""







            return self.exists(__lowercase      )







       def 			snake_case   (							self			: Union[str, Any]						,      __lowercase			: int      ):







            """simple docstring"""







            __lowercase					=bin(__lowercase      )[2:]
            return res.zfill(self.size      )







       @property
       def 			snake_case   (							self			: Any      ):







            """simple docstring"""







            return self.format_bin(self.bitarray      )







       def 			snake_case   (							self			: Any						,      __lowercase			: str      ):







            """simple docstring"""







            __lowercase					=0b0
            for func in HASH_FUNCTIONS:
                 __lowercase					=(
                     int.from_bytes(func(value.encode()      ).digest()						,      'little'      ) % self.size
                 )
                 res |= 2**position
            return res







       def 			snake_case   (							self			: Optional[Any]						,      __lowercase			: str      ):







            """simple docstring"""







            return self.format_bin(self.hash_(__lowercase      )      )







       @property
       def 			snake_case   (							self			: Tuple      ):







            """simple docstring"""







            __lowercase					=bin(self.bitarray      ).count('1'      )
            return (n_ones / self.size) ** len(__lowercase      )





'''simple docstring'''

from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_speech_available,
    is_torch_available,
)


UpperCAmelCase				   =  {
    '''configuration_speech_to_text_2''': ['''SPEECH_TO_TEXT_2_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''Speech2Text2Config'''],
    '''processing_speech_to_text_2''': ['''Speech2Text2Processor'''],
    '''tokenization_speech_to_text_2''': ['''Speech2Text2Tokenizer'''],
}


try:
       if not is_torch_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       UpperCAmelCase				   =  [
           '''SPEECH_TO_TEXT_2_PRETRAINED_MODEL_ARCHIVE_LIST''',
           '''Speech2Text2ForCausalLM''',
           '''Speech2Text2PreTrainedModel''',
       ]


if TYPE_CHECKING:
       from .configuration_speech_to_text_a import SPEECH_TO_TEXT_2_PRETRAINED_CONFIG_ARCHIVE_MAP, SpeechaTextaConfig
       from .processing_speech_to_text_a import SpeechaTextaProcessor
       from .tokenization_speech_to_text_a import SpeechaTextaTokenizer

       try:
              if not is_torch_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_speech_to_text_a import (
                  SPEECH_TO_TEXT_2_PRETRAINED_MODEL_ARCHIVE_LIST,
                  SpeechaTextaForCausalLM,
                  SpeechaTextaPreTrainedModel,
              )

else:
       import sys

       UpperCAmelCase				   =  _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)


