




import warnings

from ...utils import logging
from .image_processing_yolos import YolosImageProcessor


_lowerCamelCase      :						Any							=  logging.get_logger(__name__)


class 							UpperCamelCase_       (					UpperCAmelCase__	):

    '''simple docstring'''






    def __init__(     self :      Any   ,					*UpperCAmelCase__ :      Optional[int]   ,					**UpperCAmelCase__ :      Tuple)		->None:





           '''simple docstring'''

           warnings.warn(
               '''The class YolosFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please'''
               ''' use YolosImageProcessor instead.'''   ,					UpperCAmelCase__   ,					)
           super().__init__(*UpperCAmelCase__   ,					**UpperCAmelCase__)









'''simple docstring'''




import unittest

from transformers import DonutProcessor


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




class      UpperCamelCase__					(					unittest.TestCase			):




					"""simple docstring"""


					def lowerCamelCase_			(						self				:			List[str]						):

							'''simple docstring'''



							SCREAMING_SNAKE_CASE :				Any		=			DonutProcessor.from_pretrained(lowerCamelCase_						)



					def lowerCamelCase_			(						self				:			Tuple						):

							'''simple docstring'''



							SCREAMING_SNAKE_CASE :				Optional[int]		=			{
							    """name""": """John Doe""",
							    """age""": """99""",
							    """city""": """Atlanta""",
							    """state""": """GA""",
							    """zip""": """30301""",
							    """phone""": """123-4567""",
							    """nicknames""": [{"""nickname""": """Johnny"""}, {"""nickname""": """JD"""}],
							}

							SCREAMING_SNAKE_CASE :				List[Any]		=			(
							    """<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>"""
							)
							SCREAMING_SNAKE_CASE :				List[Any]		=			self.processor.tokenajson(lowerCamelCase_						)

							self.assertDictEqual(lowerCamelCase_      ,						lowerCamelCase_						)



