



import unittest

from transformers import DonutProcessor


lowerCamelCase__			= """naver-clova-ix/donut-base"""






class    SCREAMING_SNAKE_CASE			(							unittest.TestCase					):





							def 						UpperCamelCase_					(   self		:		List[str]	):

											'''simple docstring'''
											__a       =		DonutProcessor.from_pretrained(__lowercase	)







							def 						UpperCamelCase_					(   self		:		Optional[int]	):

											'''simple docstring'''
											__a       =		{
											    """name""": """John Doe""",
											    """age""": """99""",
											    """city""": """Atlanta""",
											    """state""": """GA""",
											    """zip""": """30301""",
											    """phone""": """123-4567""",
											    """nicknames""": [{"""nickname""": """Johnny"""}, {"""nickname""": """JD"""}],
											}

											__a       =		(
											    """<s_name>John Doe</s_name><s_age>99</s_age><s_city>Atlanta</s_city>"""
											    """<s_state>GA</s_state><s_zip>30301</s_zip><s_phone>123-4567</s_phone>"""
											    """<s_nicknames><s_nickname>Johnny</s_nickname>"""
											    """<sep/><s_nickname>JD</s_nickname></s_nicknames>"""
											)
											__a       =		self.processor.tokenajson(__lowercase	)

											self.assertDictEqual(__lowercase      ,				__lowercase	)





from typing import TYPE_CHECKING

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


lowerCamelCase__			= {"""configuration_speech_encoder_decoder""": ["""SpeechEncoderDecoderConfig"""]}

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						lowerCamelCase__			= ["""SpeechEncoderDecoderModel"""]

try:
						if not is_flax_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						lowerCamelCase__			= ["""FlaxSpeechEncoderDecoderModel"""]

if TYPE_CHECKING:
						from .configuration_speech_encoder_decoder import SpeechEncoderDecoderConfig

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_speech_encoder_decoder import SpeechEncoderDecoderModel

						try:
												if not is_flax_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_flax_speech_encoder_decoder import FlaxSpeechEncoderDecoderModel

else:
						import sys

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