



from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_tf_available,
    is_torch_available,
    is_vision_available,
)


snake_case    :						Tuple  =						{
    'configuration_efficientformer': [
        'EFFICIENTFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'EfficientFormerConfig',
    ]
}

try:
				if not is_vision_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				snake_case    :						Any  =						['EfficientFormerImageProcessor']

try:
				if not is_torch_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				snake_case    :						Optional[int]  =						[
				    'EFFICIENTFORMER_PRETRAINED_MODEL_ARCHIVE_LIST',
				    'EfficientFormerForImageClassification',
				    'EfficientFormerForImageClassificationWithTeacher',
				    'EfficientFormerModel',
				    'EfficientFormerPreTrainedModel',
				]

try:
				if not is_tf_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				snake_case    :						Union[str, Any]  =						[
				    'TF_EFFICIENTFORMER_PRETRAINED_MODEL_ARCHIVE_LIST',
				    'TFEfficientFormerForImageClassification',
				    'TFEfficientFormerForImageClassificationWithTeacher',
				    'TFEfficientFormerModel',
				    'TFEfficientFormerPreTrainedModel',
				]

if TYPE_CHECKING:
				from .configuration_efficientformer import EFFICIENTFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, EfficientFormerConfig

				try:
								if not is_vision_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .image_processing_efficientformer import EfficientFormerImageProcessor

				try:
								if not is_torch_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_efficientformer import (
								    EFFICIENTFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
								    EfficientFormerForImageClassification,
								    EfficientFormerForImageClassificationWithTeacher,
								    EfficientFormerModel,
								    EfficientFormerPreTrainedModel,
								)
				try:
								if not is_tf_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_tf_efficientformer import (
								    TF_EFFICIENTFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
								    TFEfficientFormerForImageClassification,
								    TFEfficientFormerForImageClassificationWithTeacher,
								    TFEfficientFormerModel,
								    TFEfficientFormerPreTrainedModel,
								)

else:
				import sys

				snake_case    :						Optional[int]  =						_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)




def 	snake_case__       (					__lowercase							,     __lowercase							,     __lowercase = 0							,     __lowercase = 0       )		->		int:







						"""simple docstring"""

						A__	:							Tuple						    = right or len(__lowercase       ) - 1
						if left > right:
												return -1
						elif list_data[left] == key:
												return left
						elif list_data[right] == key:
												return right
						else:
												return search(__lowercase							,     __lowercase							,     left + 1							,     right - 1       )


if __name__ == "__main__":
		import doctest

		doctest.testmod()