





from typing import TYPE_CHECKING

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


UpperCAmelCase__  :     Union[str, Any]   			= {
    '''configuration_nezha''': ['''NEZHA_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''NezhaConfig'''],
}

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							UpperCAmelCase__  :     List[str]   			= [
							    '''NEZHA_PRETRAINED_MODEL_ARCHIVE_LIST''',
							    '''NezhaForNextSentencePrediction''',
							    '''NezhaForMaskedLM''',
							    '''NezhaForPreTraining''',
							    '''NezhaForMultipleChoice''',
							    '''NezhaForQuestionAnswering''',
							    '''NezhaForSequenceClassification''',
							    '''NezhaForTokenClassification''',
							    '''NezhaModel''',
							    '''NezhaPreTrainedModel''',
							]


if TYPE_CHECKING:
							from .configuration_nezha import NEZHA_PRETRAINED_CONFIG_ARCHIVE_MAP, NezhaConfig

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_nezha import (
														    NEZHA_PRETRAINED_MODEL_ARCHIVE_LIST,
														    NezhaForMaskedLM,
														    NezhaForMultipleChoice,
														    NezhaForNextSentencePrediction,
														    NezhaForPreTraining,
														    NezhaForQuestionAnswering,
														    NezhaForSequenceClassification,
														    NezhaForTokenClassification,
														    NezhaModel,
														    NezhaPreTrainedModel,
														)


else:
							import sys

							UpperCAmelCase__  :     Any   			= _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)












import inspect
import unittest

class  __A       (  unittest.TestCase      ):


				def _snake_case    (						self							):
								try:
												import diffusers  # noqa: F401
								except ImportError:
												assert False


				def _snake_case    (						self							):
								import diffusers
								from diffusers.dependency_versions_table import deps

								lowerCamelCase			=inspect.getmembers(UpperCAmelCase_				,	inspect.isclass							)

								for cls_name, cls_module in all_classes:
												if "dummy_" in cls_module.__module__:
																for backend in cls_module._backends:
																				if backend == "k_diffusion":
																								lowerCamelCase			="""k-diffusion"""
																				elif backend == "invisible_watermark":
																								lowerCamelCase			="""invisible-watermark"""
																				assert backend in deps, f"""{backend} is not in the deps table!"""





