






import unittest

from transformers import DonutProcessor


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


class    _lowerCAmelCase			(		unittest.TestCase      ):



    """simple docstring"""



    def 					__magic_name__							(      self    :    int):






           '''simple docstring'''







           snake_case__	  =       DonutProcessor.from_pretrained(UpperCamelCase__)



    def 					__magic_name__							(      self    :    Dict):






           '''simple docstring'''







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

           snake_case__	  =       (
               """<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>"""
           )
           snake_case__	  =       self.processor.tokenajson(UpperCamelCase__)

           self.assertDictEqual(UpperCamelCase__			,		UpperCamelCase__)








from __future__ import annotations


class    _lowerCAmelCase			:



				"""simple docstring"""



				def __init__(      self    :    Optional[int]			,		UpperCamelCase__    :    int):






											'''simple docstring'''







											snake_case__	  =       data
											snake_case__	  =       None
											snake_case__	  =       None


def _UpperCAmelCase   (	a						:	Node | None ):  # In Order traversal of the tree
							if tree:
														display(tree.left )
														print(tree.data )
														display(tree.right )

def _UpperCAmelCase   (	a						:	Node | None ):
							return 1 + max(depth_of_tree(tree.left )  ,					depth_of_tree(tree.right ) ) if tree else 0

def _UpperCAmelCase   (	a						:	Node ):
							if not tree:
														return True
							if tree.left and tree.right:
														return is_full_binary_tree(tree.left ) and is_full_binary_tree(tree.right )
							else:
														return not tree.left and not tree.right

def _UpperCAmelCase   (	):  # Main function for testing.
							snake_case__	  =       Node(1 )
							snake_case__	  =       Node(2 )
							snake_case__	  =       Node(3 )
							snake_case__	  =       Node(4 )
							snake_case__	  =       Node(5 )
							snake_case__	  =       Node(6 )
							snake_case__	  =       Node(7 )
							snake_case__	  =       Node(8 )
							snake_case__	  =       Node(9 )

							print(is_full_binary_tree(a ) )
							print(depth_of_tree(a ) )
							print("""Tree is: """ )
							display(a )


if __name__ == "__main__":
	main()
