code: 
  '''simple docstring'''
  from __future__ import annotations
  
  
  
  
  def       _UpperCamelCase	(					SCREAMING_SNAKE_CASE__   ,					SCREAMING_SNAKE_CASE__   ,					SCREAMING_SNAKE_CASE__ )     ->       tuple[float, float]:
  
  
  		'''simple docstring'''
  
  
  		assert (
  		    c % greatest_common_divisor(SCREAMING_SNAKE_CASE__   ,					SCREAMING_SNAKE_CASE__ ) == 0
  		)  # greatest_common_divisor(a,b) function implemented below
  		((snake_case) ,(snake_case) ,(snake_case))     :					Tuple     =	extended_gcd(SCREAMING_SNAKE_CASE__   ,					SCREAMING_SNAKE_CASE__ )  # extended_gcd(a,b) function implemented below
  		snake_case     :					Tuple     =	c / d
  		return (r * x, r * y)
  
  
  
  
  def       _UpperCamelCase	(					SCREAMING_SNAKE_CASE__   ,					SCREAMING_SNAKE_CASE__   ,					SCREAMING_SNAKE_CASE__   ,					SCREAMING_SNAKE_CASE__ = 2 )     ->       None:
  
  
  		'''simple docstring'''
  
  
  		((snake_case) ,(snake_case))     :					List[Any]     =	diophantine(SCREAMING_SNAKE_CASE__   ,					SCREAMING_SNAKE_CASE__   ,					SCREAMING_SNAKE_CASE__ )  # Initial value
  		snake_case     :					int     =	greatest_common_divisor(SCREAMING_SNAKE_CASE__   ,					SCREAMING_SNAKE_CASE__ )
  		snake_case     :					Optional[int]     =	a // d
  		snake_case     :					Optional[Any]     =	b // d
  
  		for i in range(SCREAMING_SNAKE_CASE__ ):
  				snake_case     :					int     =	xa + i * q
  				snake_case     :					int     =	ya - i * p
  				print(SCREAMING_SNAKE_CASE__   ,					SCREAMING_SNAKE_CASE__ )
  
  
  
  
  def       _UpperCamelCase	(					SCREAMING_SNAKE_CASE__   ,					SCREAMING_SNAKE_CASE__ )     ->       int:
  
  
  		'''simple docstring'''
  
  
  		if a < b:
  				snake_case ,snake_case     :					Dict     =	b, a
  
  		while a % b != 0:
  				snake_case ,snake_case     :					Optional[Any]     =	b, a % b
  
  		return b
  
  
  
  
  def       _UpperCamelCase	(					SCREAMING_SNAKE_CASE__   ,					SCREAMING_SNAKE_CASE__ )     ->       tuple[int, int, int]:
  
  
  		'''simple docstring'''
  
  
  		assert a >= 0 and b >= 0
  
  		if b == 0:
  				snake_case ,snake_case ,snake_case     :					Any     =	a, 1, 0
  		else:
  				((snake_case) ,(snake_case) ,(snake_case))     :					Optional[Any]     =	extended_gcd(SCREAMING_SNAKE_CASE__   ,					a % b )
  				snake_case     :					List[Any]     =	q
  				snake_case     :					str     =	p - q * (a // b)
  
  		assert a % d == 0 and b % d == 0
  		assert d == a * x + b * y
  
  		return (d, x, y)
  
  
  if __name__ == "__main__":
  						from doctest import testmod
  
  						testmod(name="diophantine", verbose=True)
  						testmod(name="diophantine_all_soln", verbose=True)
  						testmod(name="extended_gcd", verbose=True)
  						testmod(name="greatest_common_divisor", verbose=True)
  
  
  
style_context: 
  '''simple docstring'''
  def       _UpperCamelCase	(					SCREAMING_SNAKE_CASE__   ,					SCREAMING_SNAKE_CASE__ )     ->       int:
  
  
  		'''simple docstring'''
  
  
  		snake_case     :					Optional[Any]     =	0
  		for ele in arr:
  				total_sum += product_sum(SCREAMING_SNAKE_CASE__   ,					depth + 1 ) if isinstance(SCREAMING_SNAKE_CASE__   ,					SCREAMING_SNAKE_CASE__ ) else ele
  		return total_sum * depth
  
  
  
  
  def       _UpperCamelCase	(					SCREAMING_SNAKE_CASE__ )     ->       int:
  
  
  		'''simple docstring'''
  
  
  		return product_sum(SCREAMING_SNAKE_CASE__   ,					1 )
  
  
  if __name__ == "__main__":
  						import doctest
  
  						doctest.testmod()
  
  
  