





from typing import TYPE_CHECKING

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


_SCREAMING_SNAKE_CASE 		=						{
    """configuration_ctrl""": ["""CTRL_PRETRAINED_CONFIG_ARCHIVE_MAP""", """CTRLConfig"""],
    """tokenization_ctrl""": ["""CTRLTokenizer"""],
}

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_SCREAMING_SNAKE_CASE 		=						[
						    """CTRL_PRETRAINED_MODEL_ARCHIVE_LIST""",
						    """CTRLForSequenceClassification""",
						    """CTRLLMHeadModel""",
						    """CTRLModel""",
						    """CTRLPreTrainedModel""",
						]

try:
						if not is_tf_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_SCREAMING_SNAKE_CASE 		=						[
						    """TF_CTRL_PRETRAINED_MODEL_ARCHIVE_LIST""",
						    """TFCTRLForSequenceClassification""",
						    """TFCTRLLMHeadModel""",
						    """TFCTRLModel""",
						    """TFCTRLPreTrainedModel""",
						]


if TYPE_CHECKING:
						from .configuration_ctrl import CTRL_PRETRAINED_CONFIG_ARCHIVE_MAP, CTRLConfig
						from .tokenization_ctrl import CTRLTokenizer

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_ctrl import (
												    CTRL_PRETRAINED_MODEL_ARCHIVE_LIST,
												    CTRLForSequenceClassification,
												    CTRLLMHeadModel,
												    CTRLModel,
												    CTRLPreTrainedModel,
												)

						try:
												if not is_tf_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_tf_ctrl import (
												    TF_CTRL_PRETRAINED_MODEL_ARCHIVE_LIST,
												    TFCTRLForSequenceClassification,
												    TFCTRLLMHeadModel,
												    TFCTRLModel,
												    TFCTRLPreTrainedModel,
												)

else:
						import sys

						_SCREAMING_SNAKE_CASE 		=						_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)








def 							SCREAMING_SNAKE_CASE__  (      __a				,	__a = False				):

	if not isinstance(__a				,	__a				):
		snake_case_						:     str     =		f"""Expected string as input, found {type(__a				)}"""
		raise ValueError(__a				)
	if not isinstance(__a				,	__a				):
		snake_case_						:     int     =		f"""Expected boolean as use_pascal parameter, found {type(__a				)}"""
		raise ValueError(__a				)

	snake_case_						:     Union[str, Any]     =		input_str.split('_'				)

	snake_case_						:     int     =		0 if use_pascal else 1

	snake_case_						:     List[Any]     =		words[start_index:]

	snake_case_						:     str     =		[word[0].upper() + word[1:] for word in words_to_capitalize]

	snake_case_						:     Optional[Any]     =		'' if use_pascal else words[0]

	return "".join([initial_word, *capitalized_words]				)


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

						testmod()

