



from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tf_available, is_torch_available


lowerCAmelCase					:				Optional[Any]   	={
    'configuration_esm': ['ESM_PRETRAINED_CONFIG_ARCHIVE_MAP', 'EsmConfig'],
    'tokenization_esm': ['EsmTokenizer'],
}

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		lowerCAmelCase					:				Optional[Any]   	=[
		    'ESM_PRETRAINED_MODEL_ARCHIVE_LIST',
		    'EsmForMaskedLM',
		    'EsmForSequenceClassification',
		    'EsmForTokenClassification',
		    'EsmModel',
		    'EsmPreTrainedModel',
		]
		lowerCAmelCase					:				List[Any]   	=['EsmForProteinFolding', 'EsmFoldPreTrainedModel']

try:
		if not is_tf_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		lowerCAmelCase					:				Dict   	=[
		    'TF_ESM_PRETRAINED_MODEL_ARCHIVE_LIST',
		    'TFEsmForMaskedLM',
		    'TFEsmForSequenceClassification',
		    'TFEsmForTokenClassification',
		    'TFEsmModel',
		    'TFEsmPreTrainedModel',
		]

if TYPE_CHECKING:
		from .configuration_esm import ESM_PRETRAINED_CONFIG_ARCHIVE_MAP, EsmConfig
		from .tokenization_esm import EsmTokenizer

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_esm import (
				    ESM_PRETRAINED_MODEL_ARCHIVE_LIST,
				    EsmForMaskedLM,
				    EsmForSequenceClassification,
				    EsmForTokenClassification,
				    EsmModel,
				    EsmPreTrainedModel,
				)
				from .modeling_esmfold import EsmFoldPreTrainedModel, EsmForProteinFolding

		try:
				if not is_tf_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_tf_esm import (
				    TF_ESM_PRETRAINED_MODEL_ARCHIVE_LIST,
				    TFEsmForMaskedLM,
				    TFEsmForSequenceClassification,
				    TFEsmForTokenClassification,
				    TFEsmModel,
				    TFEsmPreTrainedModel,
				)


else:
		import sys

		lowerCAmelCase					:				str   	=_LazyModule(__name__, globals()['__file__'], _import_structure)






def  _UpperCAmelCase  (				SCREAMING_SNAKE_CASE__  ):


						'''simple docstring'''




						lowerCAmelCase	:   List[str]					     =					str(SCREAMING_SNAKE_CASE__  ).strip()
						if not bin_string:
												raise ValueError("""Empty string was passed to the function"""  )
						lowerCAmelCase	:   Optional[int]					     =					bin_string[0] == """-"""
						if is_negative:
												lowerCAmelCase	:   Tuple					     =					bin_string[1:]
						if not all(char in """01""" for char in bin_string  ):
												raise ValueError("""Non-binary value was passed to the function"""  )
						lowerCAmelCase	:   Union[str, Any]					     =					0
						for char in bin_string:
												lowerCAmelCase	:   int					     =					2 * decimal_number + int(SCREAMING_SNAKE_CASE__  )
						return -decimal_number if is_negative else decimal_number


if __name__ == "__main__":
		from doctest import testmod

		testmod()

