from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_sentencepiece_available, is_tokenizers_available


__SCREAMING_SNAKE_CASE						:    str     = {}

try:
				if not is_sentencepiece_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				__SCREAMING_SNAKE_CASE						:    Tuple     = ['MBart50Tokenizer']

try:
				if not is_tokenizers_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				__SCREAMING_SNAKE_CASE						:    Optional[int]     = ['MBart50TokenizerFast']


if TYPE_CHECKING:
				try:
								if not is_sentencepiece_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .tokenization_mbartaa import MBartaaTokenizer

				try:
								if not is_tokenizers_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .tokenization_mbartaa_fast import MBartaaTokenizerFast

else:
				import sys

				__SCREAMING_SNAKE_CASE						:    Any     = _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)
def 					snake_case						(__lowercase						)       ->       int:

						'''simple docstring'''



						if not isinstance(__lowercase					,			__lowercase						) or number < 0:
												raise ValueError("Input must be a non-negative integer"						)

						_snake_case						:     List[Any]				=    number & ~(number - 1)
						_snake_case						:     Union[str, Any]				=    0
						while intermediate:
												intermediate >>= 1
												index += 1
						return index - 1


if __name__ == "__main__":
				import doctest

				doctest.testmod(verbose=True)