
'''simple docstring'''



import unittest

from transformers import DonutProcessor


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




class   UpperCAmelCase_					(		unittest.TestCase			):






						'''simple docstring'''






						def  _lowercase     ( self				):

												"""simple docstring"""



												_lowerCAmelCase  						=			DonutProcessor.from_pretrained(_lowercase				)




						def  _lowercase     ( self				):

												"""simple docstring"""



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

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

												self.assertDictEqual(_lowercase   ,       _lowercase				)


'''simple docstring'''



def A				(__lowerCamelCase				:list[int]			,     __lowerCamelCase				:list[int]		):

						# Check if the input is valid
						if not len(__lowerCamelCase		) == len(__lowerCamelCase		) == 3:
												raise ValueError("""Please enter a valid equation."""		)
						if equationa[0] == equationa[1] == equationa[0] == equationa[1] == 0:
												raise ValueError("""Both a & b of two equations can't be zero."""		)

						# Extract the coefficients
						_lowerCAmelCase						,   _lowerCAmelCase						,   _lowerCAmelCase  						=			equationa
						_lowerCAmelCase						,   _lowerCAmelCase						,   _lowerCAmelCase  						=			equationa

						# Calculate the determinants of the matrices
						_lowerCAmelCase  						=			aa * ba - aa * ba
						_lowerCAmelCase  						=			ca * ba - ca * ba
						_lowerCAmelCase  						=			aa * ca - aa * ca

						# Check if the system of linear equations has a solution (using Cramer's rule)
						if determinant == 0:
												if determinant_x == determinant_y == 0:
																		raise ValueError("""Infinite solutions. (Consistent system)"""		)
												else:
																		raise ValueError("""No solution. (Inconsistent system)"""		)
						else:
												if determinant_x == determinant_y == 0:
																		# Trivial solution (Inconsistent system)
																		return (0.0, 0.0)
												else:
																		_lowerCAmelCase  						=			determinant_x / determinant
																		_lowerCAmelCase  						=			determinant_y / determinant
																		# Non-Trivial Solution (Consistent system)
																		return (x, y)
