


import unittest

from transformers import DonutProcessor


SCREAMING_SNAKE_CASE							    =							'naver-clova-ix/donut-base'


class     __UpperCAmelCase							(       unittest.TestCase							):


     """simple docstring"""


     def 	snake_case_  (	self    ):
        __a					=  DonutProcessor.from_pretrained(__A    )


     def 	snake_case_  (	self    ):
        __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(__A    )

        self.assertDictEqual(__A  ,       __A    )







from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


SCREAMING_SNAKE_CASE							    =							{'configuration_wavlm': ['WAVLM_PRETRAINED_CONFIG_ARCHIVE_MAP', 'WavLMConfig']}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  SCREAMING_SNAKE_CASE							    =							[
      'WAVLM_PRETRAINED_MODEL_ARCHIVE_LIST',
      'WavLMForAudioFrameClassification',
      'WavLMForCTC',
      'WavLMForSequenceClassification',
      'WavLMForXVector',
      'WavLMModel',
      'WavLMPreTrainedModel',
  ]

if TYPE_CHECKING:
  from .configuration_wavlm import WAVLM_PRETRAINED_CONFIG_ARCHIVE_MAP, WavLMConfig

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_wavlm import (
        WAVLM_PRETRAINED_MODEL_ARCHIVE_LIST,
        WavLMForAudioFrameClassification,
        WavLMForCTC,
        WavLMForSequenceClassification,
        WavLMForXVector,
        WavLMModel,
        WavLMPreTrainedModel,
    )

else:
  import sys

  SCREAMING_SNAKE_CASE							    =							_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)



